Index: trip-planner-front/node_modules/.cache/babel-webpack/04af5ae8e3380af602ec0f90e8126748.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/04af5ae8e3380af602ec0f90e8126748.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/04af5ae8e3380af602ec0f90e8126748.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n      console.log(idContains);\n\n      if (idContains != null) {} else {}\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\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,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   console.log(idContains);\n   if(idContains != null){\n   }else{\n   }\n  }\n  console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/056c2031646bc68d1acbe6a1375d01a7.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/056c2031646bc68d1acbe6a1375d01a7.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/056c2031646bc68d1acbe6a1375d01a7.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/input\";\nimport * as i7 from \"@angular/forms\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(7, \"input\", 2);\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatInput, i7.DefaultValueAccessor, i8.MatAutocompleteTrigger, i7.NgControlStatus, i7.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACYM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAA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,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n  <label><h5>Please select a place</h5></label>\n  <!--\n    \n  -->\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/05da4403c1c46e324a3b39a7c9b57641.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/05da4403c1c46e324a3b39a7c9b57641.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/05da4403c1c46e324a3b39a7c9b57641.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/input\";\nimport * as i7 from \"@angular/forms\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(7, \"input\", 2);\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatInput, i7.DefaultValueAccessor, i8.MatAutocompleteTrigger, i7.NgControlStatus, i7.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACSM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAl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AA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/064c0d115f35329bf8a57c62e02fd539.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/064c0d115f35329bf8a57c62e02fd539.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/064c0d115f35329bf8a57c62e02fd539.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      this.chipsSeletion.indexOf();\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,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,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    this.chipsSeletion.indexOf()\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/0674a42eeb21c9488143d65749d0d70c.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/0674a42eeb21c9488143d65749d0d70c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/0674a42eeb21c9488143d65749d0d70c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,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{ Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  \n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/0765b03efd13f40f8bd0c322e83248eb.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/0765b03efd13f40f8bd0c322e83248eb.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/0765b03efd13f40f8bd0c322e83248eb.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/input\";\nimport * as i7 from \"@angular/forms\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵtext(4, \"'' \");\n      i0.ɵɵelementStart(5, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 2);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 6);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 11);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatInput, i7.DefaultValueAccessor, i8.MatAutocompleteTrigger, i7.NgControlStatus, i7.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAA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,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;;;;;;AA/BlD,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n  <label><h5>Please select a place</h5></label>''\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/0a38b0c499eab0464d61049f6b2ebc3c.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/0a38b0c499eab0464d61049f6b2ebc3c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/0a38b0c499eab0464d61049f6b2ebc3c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA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A,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/0babc15340fa84028cf5e4ce58a69329.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/0babc15340fa84028cf5e4ce58a69329.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/0babc15340fa84028cf5e4ce58a69329.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n    if (idContains != null) {\n      chip.toggleSelected();\n      console.log(chip);\n      this.chipsSeletion.push(category.id);\n      console.log(this.chipsSeletion);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAA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AAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n   }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/0cdde0d05577f7acb08df9598989d872.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/0cdde0d05577f7acb08df9598989d872.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/0cdde0d05577f7acb08df9598989d872.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {}\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,qEAAA,GAAA;AAAA,YAAA,WAAA,GAAA,EAAA,CAAA,aAAA,CAAA,IAAA,CAAA;AAAA,YAAA,WAAA,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,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    \n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/0dd927891b789d26a0cad13aa6296619.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/0dd927891b789d26a0cad13aa6296619.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/0dd927891b789d26a0cad13aa6296619.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    let idContains = this.chipsSeletion.filter(id => id === category.id);\n    if (idContains) chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,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AA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains !)\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/0e24478dedac3d9deca5ff96e703044a.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/0e24478dedac3d9deca5ff96e703044a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/0e24478dedac3d9deca5ff96e703044a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/input\";\nimport * as i7 from \"@angular/forms\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(7, \"input\", 2);\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatInput, i7.DefaultValueAccessor, i8.MatAutocompleteTrigger, i7.NgControlStatus, i7.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"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AA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;;;;;;AA/BlD,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/0ed8ec32da5bdc1de5e02fcc9ea0c675.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/0ed8ec32da5bdc1de5e02fcc9ea0c675.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/0ed8ec32da5bdc1de5e02fcc9ea0c675.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,E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AAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/0f3de5855f50669164076237596f79a0.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/0f3de5855f50669164076237596f79a0.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/0f3de5855f50669164076237596f79a0.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    this.chipsSeletion.filter(id => id === category.id);\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAA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AA,CAAA,EAAA,EAAA,oCAAA;AAAkC,MAAA,EAAA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   \n  this.chipsSeletion.filter(id => id === category.id);\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/1192b410d3065fdb294d572ce390468e.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/1192b410d3065fdb294d572ce390468e.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/1192b410d3065fdb294d572ce390468e.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    this.chipsSeletion.map(x => x.id).filter(x);\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAA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GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   this.chipsSeletion.map(x => x.id).filter(x)\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/140fd2df9aa9a0f9dd233eb0fbbe8cc6.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/140fd2df9aa9a0f9dd233eb0fbbe8cc6.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/140fd2df9aa9a0f9dd233eb0fbbe8cc6.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,Y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C7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  \n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/14e7de61ac3b7bc156e7f1da54ad4d20.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/14e7de61ac3b7bc156e7f1da54ad4d20.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/14e7de61ac3b7bc156e7f1da54ad4d20.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    this.chipsSeletion.filter;\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA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,CAAA,EAAA,EAAA,IAAA;AAAI,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,oCAAA;AAAkC,MAAA,EAAA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   this.chipsSeletion.filter\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/16d3437947b60ac27c54b25922da6fa5.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/16d3437947b60ac27c54b25922da6fa5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/16d3437947b60ac27c54b25922da6fa5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n      if (idContains != null) {} else {\n        this.chipsSeletion.push(category.id);\n      }\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA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EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   }else{\n    this.chipsSeletion.push(category.id);\n\n   }\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/174f9a86642934e5fc41d6d50247e8ad.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/174f9a86642934e5fc41d6d50247e8ad.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/174f9a86642934e5fc41d6d50247e8ad.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/forms\";\nimport * as i7 from \"@angular/material/autocomplete\";\nimport * as i8 from \"@angular/common\";\nimport * as i9 from \"@angular/material/select\";\nimport * as i10 from \"@angular/material/input\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(7, \"input\", 2);\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.DefaultValueAccessor, i7.MatAutocompleteTrigger, i6.NgControlStatus, i6.FormControlDirective, i7.MatAutocomplete, i8.NgForOf, i9.MatSelect, i10.MatInput, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i8.NgIf, i14.MatIcon],\n  pipes: [i8.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACMM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;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SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/17503638ec40d6a8c0ee3cc331f8072b.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/17503638ec40d6a8c0ee3cc331f8072b.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/17503638ec40d6a8c0ee3cc331f8072b.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    this.chipsSeletion.map(x => x.id);\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,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CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   this.chipsSeletion.map(x => x.id)\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/1a178c9dd60257cdc7f7ac763ae6127e.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/1a178c9dd60257cdc7f7ac763ae6127e.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/1a178c9dd60257cdc7f7ac763ae6127e.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;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;AAAkC,MAAA,EAAA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chips\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/1b12d3805a3e15fda07ee93bb0567bc5.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/1b12d3805a3e15fda07ee93bb0567bc5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/1b12d3805a3e15fda07ee93bb0567bc5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n    console.log(chip); //this.chipsSeletion.push(chip.id);\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA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AA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n   console.log(chip)\n   //this.chipsSeletion.push(chip.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/1b18684dbdd62bda8578f44f3d2711b6.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/1b18684dbdd62bda8578f44f3d2711b6.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/1b18684dbdd62bda8578f44f3d2711b6.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    this.chipsSeletion.map();\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"m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SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   this.chipsSeletion.map()\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/1deee1ed4d7311a7e225d2e3fea1bf0a.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/1deee1ed4d7311a7e225d2e3fea1bf0a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/1deee1ed4d7311a7e225d2e3fea1bf0a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        this.chipsSeletion.s;\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,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AA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      this.chipsSeletion.s\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/1ed064d249ad557eac8777fe60a5aee3.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/1ed064d249ad557eac8777fe60a5aee3.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/1ed064d249ad557eac8777fe60a5aee3.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        this.chipsSeletion.splice(category);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,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MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,oCAAA;AAAkC,MAAA,EAAA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      this.chipsSeletion.splice(category)\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/1f5c0f3c94583299d727245a8f0c5a77.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/1f5c0f3c94583299d727245a8f0c5a77.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/1f5c0f3c94583299d727245a8f0c5a77.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n    if (idContains != null) {}\n\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAA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A,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){}\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/1f6a1386f771af6b1ef4f88987a78a2c.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/1f6a1386f771af6b1ef4f88987a78a2c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/1f6a1386f771af6b1ef4f88987a78a2c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected(); //this.chipsSeletion.push(chip.id);\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA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AAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n   //this.chipsSeletion.push(chip.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/1fc28bc6632ef89ed93d65f9f396bd44.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/1fc28bc6632ef89ed93d65f9f396bd44.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/1fc28bc6632ef89ed93d65f9f396bd44.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/input\";\nimport * as i7 from \"@angular/forms\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(7, \"input\", 2);\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatInput, i7.DefaultValueAccessor, i8.MatAutocompleteTrigger, i7.NgControlStatus, i7.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,C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MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n  <label><h5>Please select a place</h5></label>\n  <!---->\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/205409afc494708fbc7bca61a275fb24.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/205409afc494708fbc7bca61a275fb24.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/205409afc494708fbc7bca61a275fb24.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n      console.log(idContains);\n\n      if (idContains != null) {} else {}\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,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A,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   console.log(idContains);\n   if(idContains != null){\n   }else{\n   \n   }\n  }\n  console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/2151db508d09a376a56e007f69eec46b.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/2151db508d09a376a56e007f69eec46b.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/2151db508d09a376a56e007f69eec46b.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 0;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"ngModel\", \"matAutocomplete\", \"ngModelChange\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(8, \"input\", 3);\n      i0.ɵɵlistener(\"ngModelChange\", function LocationsFormComponent_Template_input_ngModelChange_8_listener($event) {\n        return ctx.locationId = $event;\n      });\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"ngModel\", ctx.locationId)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.NgModel, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAA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A,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 0;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [(ngModel)]=\"locationId\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/217e455286f69ae1f4434fcc1aa9876a.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/217e455286f69ae1f4434fcc1aa9876a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/217e455286f69ae1f4434fcc1aa9876a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\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 \"@angular/material/select\";\nimport * as i10 from \"@angular/material/chips\";\nimport * as i11 from \"@angular/material/button\";\nimport * as i12 from \"@angular/material/core\";\nimport * as i13 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \")\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(7, \"input\", 2);\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\")\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatInput, i7.MatAutocompleteTrigger, i7.MatAutocomplete, i8.NgForOf, i9.MatSelect, i10.MatChipList, i11.MatButton, i12.MatOption, i10.MatChip, i8.NgIf, i13.MatIcon],\n  pipes: [i8.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;ACSM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAA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AA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [)]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/21e0938449d40215415179dea1e4b774.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/21e0938449d40215415179dea1e4b774.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/21e0938449d40215415179dea1e4b774.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {} else {\n      this.chipsSeletion.push;\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\b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A,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n\n  }else{\n    this.chipsSeletion.push\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/235451843fb2501228777c8acb8a7e5c.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/235451843fb2501228777c8acb8a7e5c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/235451843fb2501228777c8acb8a7e5c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    this.chipsSeletion.map;\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,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,cAAA,CAAA,EAAA,EAAA,IAAA;AAAI,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,oCAAA;AAAkC,MAAA,EAAA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   this.chipsSeletion.map\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/244a06960def68d5052bd27cff2bd596.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/244a06960def68d5052bd27cff2bd596.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/244a06960def68d5052bd27cff2bd596.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n      console.log(idContains);\n\n      if (idContains != null) {} else {}\n    }\n\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAA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,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   console.log(idContains);\n   if(idContains != null){\n   }else{\n   }\n  }\n  this.chipsSeletion.push(category.id);\n  console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/26af101169a2bdbdca9d9633060f4210.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/26af101169a2bdbdca9d9633060f4210.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/26af101169a2bdbdca9d9633060f4210.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n      console.log(idContains);\n\n      if (idContains != null) {} else {\n        this.chipsSeletion.push(category.id);\n      }\n    }\n\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD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yB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   console.log(idContains);\n   if(idContains != null){\n   }else{\n    this.chipsSeletion.push(category.id);\n   }\n  }\n  this.chipsSeletion.push(category.id);\n  console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/27943cf087c11c65b4ea70cfd3331e28.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/27943cf087c11c65b4ea70cfd3331e28.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/27943cf087c11c65b4ea70cfd3331e28.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/input\";\nimport * as i7 from \"@angular/forms\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 0;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"ngModel\", \"matAutocomplete\", \"ngModelChange\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(7, \"input\", 2);\n      i0.ɵɵlistener(\"ngModelChange\", function LocationsFormComponent_Template_input_ngModelChange_7_listener($event) {\n        return ctx.locationId = $event;\n      });\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"ngModel\", ctx.locationId)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatInput, i7.DefaultValueAccessor, i8.MatAutocompleteTrigger, i7.NgControlStatus, i7.NgModel, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACQM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA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B,GAAxB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 0;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [(ngModel)]=\"locationId\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/2c15f15fbdef4c63710603e5c332269a.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/2c15f15fbdef4c63710603e5c332269a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/2c15f15fbdef4c63710603e5c332269a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n      if (idContains != null) {\n        chip.toggleSelected();\n        console.log(chip);\n        this.chipsSeletion.push(category.id);\n        console.log(this.chipsSeletion);\n      }\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA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,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n   }\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/2c2a835359206449147bd5753db1dbd5.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/2c2a835359206449147bd5753db1dbd5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/2c2a835359206449147bd5753db1dbd5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,qEAAA,GAAA;AAAA,MAAA,EAAA,CAAA,aAAA,CAAA,IAAA;;AAAA,YAAA,GAAA,GAAA,EAAA,CAAA,WAAA,CAAA,CAAA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AAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[]\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/2dd011d18581d3f76f4246a88c4e4ef4.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/2dd011d18581d3f76f4246a88c4e4ef4.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/2dd011d18581d3f76f4246a88c4e4ef4.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n      if (idContains != null) {} else {}\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,U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;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   }else{\n     \n   }\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/2ed2c0055f7b2c82b9aea73551ab5f25.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/2ed2c0055f7b2c82b9aea73551ab5f25.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/2ed2c0055f7b2c82b9aea73551ab5f25.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {} else {\n      this.chipsSeletion.push(category.d);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D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CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n\n  }else{\n    this.chipsSeletion.push(category.d)\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/3143961d55130dab5fb4a0e8195028f5.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/3143961d55130dab5fb4a0e8195028f5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/3143961d55130dab5fb4a0e8195028f5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/autocomplete\";\nimport * as i7 from \"@angular/common\";\nimport * as i8 from \"@angular/material/select\";\nimport * as i9 from \"@angular/material/input\";\nimport * as i10 from \"@angular/material/chips\";\nimport * as i11 from \"@angular/material/button\";\nimport * as i12 from \"@angular/material/core\";\nimport * as i13 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 7,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"form]\", \"locationId\", 3, \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(7, \"input\", 2);\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 5, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatAutocompleteTrigger, i6.MatAutocomplete, i7.NgForOf, i8.MatSelect, i9.MatInput, i10.MatChipList, i11.MatButton, i12.MatOption, i10.MatChip, i7.NgIf, i13.MatIcon],\n  pipes: [i7.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;ACMM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,qEAAA,GAAA;AAAA,YAAA,WAAA,GAAA,EAAA,CAAA,aAAA,CAAA,IAAA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AA,EAAA,CAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;;;;;;AA9BlD,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,iBAAA,EAAA,GAAA;AAE0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           form]=\"locationId\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/329a1c1f7b4de62e5ba82a48ce15fe02.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/329a1c1f7b4de62e5ba82a48ce15fe02.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/329a1c1f7b4de62e5ba82a48ce15fe02.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    let idContains = this.chipsSeletion.filter(id => id === category.id);\n    if (idContains != null) chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAA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,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null)\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/330fdbaa533c963268ba14815320a583.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/330fdbaa533c963268ba14815320a583.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/330fdbaa533c963268ba14815320a583.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 7,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 5, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i8.MatAutocompleteTrigger, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,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;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           \n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/3377a83b4f83740af325abe090cdad5a.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/3377a83b4f83740af325abe090cdad5a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/3377a83b4f83740af325abe090cdad5a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA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AAA,CAAA,EAAA,EAAA,IAAA;AAAI,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,oCAAA;AAAkC,MAAA,EAAA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n console.log\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/363862aa26eb81fc7cc73db91cdc2608.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/363862aa26eb81fc7cc73db91cdc2608.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/363862aa26eb81fc7cc73db91cdc2608.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) ;\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,Q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;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1)\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/3f5dd2a48bfe8914df2173cdc3837ef5.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/3f5dd2a48bfe8914df2173cdc3837ef5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/3f5dd2a48bfe8914df2173cdc3837ef5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/autocomplete\";\nimport * as i7 from \"@angular/common\";\nimport * as i8 from \"@angular/material/select\";\nimport * as i9 from \"@angular/material/input\";\nimport * as i10 from \"@angular/material/chips\";\nimport * as i11 from \"@angular/material/button\";\nimport * as i12 from \"@angular/material/core\";\nimport * as i13 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", 3, \"form\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(7, \"input\", 2);\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"form\", ctx.locationId)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatAutocompleteTrigger, i6.MatAutocomplete, i7.NgForOf, i8.MatSelect, i9.MatInput, i10.MatChipList, i11.MatButton, i12.MatOption, i10.MatChip, i7.NgIf, i13.MatIcon],\n  pipes: [i7.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;ACMM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAA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,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           [form]=\"locationId\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/3fed7e3a083b339a24ca1f1ae9bef5cc.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/3fed7e3a083b339a24ca1f1ae9bef5cc.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/3fed7e3a083b339a24ca1f1ae9bef5cc.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/autocomplete\";\nimport * as i7 from \"@angular/common\";\nimport * as i8 from \"@angular/material/select\";\nimport * as i9 from \"@angular/material/input\";\nimport * as i10 from \"@angular/material/chips\";\nimport * as i11 from \"@angular/material/button\";\nimport * as i12 from \"@angular/material/core\";\nimport * as i13 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 7,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"formC]\", \"locationId\", 3, \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(7, \"input\", 2);\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 5, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatAutocompleteTrigger, i6.MatAutocomplete, i7.NgForOf, i8.MatSelect, i9.MatInput, i10.MatChipList, i11.MatButton, i12.MatOption, i10.MatChip, i7.NgIf, i13.MatIcon],\n  pipes: [i7.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;ACMM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,qEAAA,GAAA;AAAA,YAAA,WAAA,GAAA,EAAA,CAAA,aAAA,CAAA,IAAA,CAAA;AAAA,Y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;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;;;;;;AA9BlD,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,iBAAA,EAAA,GAAA;AAE0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           formC]=\"locationId\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/404510139ed9415d2274fc19ac800d29.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/404510139ed9415d2274fc19ac800d29.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/404510139ed9415d2274fc19ac800d29.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n      if (idContains != null) {\n        chip.toggleSelected();\n        console.log(chip);\n        this.chipsSeletion.push(category.id);\n        console.log(this.chipsSeletion);\n      }\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IA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AA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.\n   log(this.chipsSeletion);\n   }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/41eb9726cbe1b7274ff90e50c95147c1.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/41eb9726cbe1b7274ff90e50c95147c1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/41eb9726cbe1b7274ff90e50c95147c1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    let id;\n    this.chipsSeletion.filter(id => id === category.id);\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YA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,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   let id\n  this.chipsSeletion.filter(id => id === category.id);\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/447cd3d11a28217e85ef52c807910d7d.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/447cd3d11a28217e85ef52c807910d7d.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/447cd3d11a28217e85ef52c807910d7d.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,qEAAA,GAAA;AAAA,YAAA,WAAA,GAAA,EAAA,CAA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IAAA;AAAI,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,oCAAA;AAAkC,MAAA,EAAA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id)\n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/4bce08701ef134c3c71de98fdd3ca0cb.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/4bce08701ef134c3c71de98fdd3ca0cb.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/4bce08701ef134c3c71de98fdd3ca0cb.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    this.chipsSeletion.map(x => x.id).filter(id);\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AAC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C7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   this.chipsSeletion.map(x => x.id).filter(id )\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/519ac9887b1a1f8a670db771014a0738.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/519ac9887b1a1f8a670db771014a0738.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/519ac9887b1a1f8a670db771014a0738.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(chip.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,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ular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(chip.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/51dba8adb791c1904af4279d861144f1.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/51dba8adb791c1904af4279d861144f1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/51dba8adb791c1904af4279d861144f1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n    if (idContains != null) {\n      chip.toggleSelected();\n      console.log(chip);\n      this.chipsSeletion.push(category.id);\n      console.log(this.chipsSeletion);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAA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,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/57e6fa60b4db4fad667abdc34ec7b19f.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/57e6fa60b4db4fad667abdc34ec7b19f.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/57e6fa60b4db4fad667abdc34ec7b19f.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, ctx_r9.cat);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n    console.log(chip); //this.chipsSeletion.push(chip.id);\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAA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AA,EAAA,EAAA,oCAAA;AAAkC,MAAA,EAAA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n   console.log(chip);\n   //this.chipsSeletion.push(chip.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, cat)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/58784f3dce82c666fffbf7233e47121d.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/58784f3dce82c666fffbf7233e47121d.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/58784f3dce82c666fffbf7233e47121d.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    this.chipsSeletion.chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,E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GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   this.chipsSeletion.\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/595d2f7bbcd780ae485258015d943d82.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/595d2f7bbcd780ae485258015d943d82.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/595d2f7bbcd780ae485258015d943d82.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,U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AAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/595d326c5af558d4f1e2ac55782d9316.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/595d326c5af558d4f1e2ac55782d9316.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/595d326c5af558d4f1e2ac55782d9316.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n    console.log(chip); //this.chipsSeletion.push(chip.id);\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAAA,UAAA,CAAA,OAA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EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n   console.log(chip);\n   //this.chipsSeletion.push(chip.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/5987584d8055ae650c35221279c0e34a.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/5987584d8055ae650c35221279c0e34a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/5987584d8055ae650c35221279c0e34a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {}\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA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,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      \n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/5c4e99d60718e248ff6bf166dd0a51d1.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/5c4e99d60718e248ff6bf166dd0a51d1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/5c4e99d60718e248ff6bf166dd0a51d1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n    if (this.chipsSeletion.length > 0) ;\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,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AA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0)\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/5dbd3e63f7cad1775477b8539aee5bd5.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/5dbd3e63f7cad1775477b8539aee5bd5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/5dbd3e63f7cad1775477b8539aee5bd5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/autocomplete\";\nimport * as i7 from \"@angular/common\";\nimport * as i8 from \"@angular/material/select\";\nimport * as i9 from \"@angular/material/input\";\nimport * as i10 from \"@angular/material/chips\";\nimport * as i11 from \"@angular/material/button\";\nimport * as i12 from \"@angular/material/core\";\nimport * as i13 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 7,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", 3, \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(7, \"input\", 2);\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 5, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatAutocompleteTrigger, i6.MatAutocomplete, i7.NgForOf, i8.MatSelect, i9.MatInput, i10.MatChipList, i11.MatButton, i12.MatOption, i10.MatChip, i7.NgIf, i13.MatIcon],\n  pipes: [i7.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;ACKM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAA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AA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/5ea2e4b6ff7ecbc691b21c4bccd9b49c.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/5ea2e4b6ff7ecbc691b21c4bccd9b49c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/5ea2e4b6ff7ecbc691b21c4bccd9b49c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {} else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations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A,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n\n  }else{\n    this.chipsSeletion.push(category.id)\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/63e2d3d48607858569832ad479227d3f.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/63e2d3d48607858569832ad479227d3f.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/63e2d3d48607858569832ad479227d3f.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n    this.chipsSeletion.push(chip.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CA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EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n   this.chipsSeletion.push(chip.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/67e7fceb880390edaf50c5036c463dfa.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/67e7fceb880390edaf50c5036c463dfa.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/67e7fceb880390edaf50c5036c463dfa.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    let idContains = this.chipsSeletion.filter(id => id === category.id);\n    if (idContains) chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAA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,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains )\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/67ef41b576981a106a5c6aef146897e9.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/67ef41b576981a106a5c6aef146897e9.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/67ef41b576981a106a5c6aef146897e9.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id)) ;\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IA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A;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id)\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/6a2974a874c9acda688969e5c5a860b6.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/6a2974a874c9acda688969e5c5a860b6.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/6a2974a874c9acda688969e5c5a860b6.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CA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AAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/6afd6df43d15fa898b28332630b8680c.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/6afd6df43d15fa898b28332630b8680c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/6afd6df43d15fa898b28332630b8680c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/autocomplete\";\nimport * as i7 from \"@angular/common\";\nimport * as i8 from \"@angular/material/select\";\nimport * as i9 from \"@angular/material/input\";\nimport * as i10 from \"@angular/material/chips\";\nimport * as i11 from \"@angular/material/button\";\nimport * as i12 from \"@angular/material/core\";\nimport * as i13 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", 3, \"con\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(7, \"input\", 2);\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"con\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatAutocompleteTrigger, i6.MatAutocomplete, i7.NgForOf, i8.MatSelect, i9.MatInput, i10.MatChipList, i11.MatButton, i12.MatOption, i10.MatChip, i7.NgIf, i13.MatIcon],\n  pipes: [i7.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;ACMM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAA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UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           [con]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/6b8848425ae748480ae202dff08dc062.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/6b8848425ae748480ae202dff08dc062.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/6b8848425ae748480ae202dff08dc062.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    this.chipsSeletion.map(x => x.id).filter(id => id);\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,qEAAA,GAAA;AAAA,YAAA,WAAA,GAAA,EAAA,CAAA,aAAA,CAAA,IAAA,CAAA;AAAA,YAAA,WAAA,GAAA,WAAA,CAAA,SA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EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   this.chipsSeletion.map(x => x.id).filter(id => id)\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/6c2e8681d6351ed725978bc1bdd4ef83.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/6c2e8681d6351ed725978bc1bdd4ef83.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/6c2e8681d6351ed725978bc1bdd4ef83.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/autocomplete\";\nimport * as i7 from \"@angular/common\";\nimport * as i8 from \"@angular/material/select\";\nimport * as i9 from \"@angular/material/input\";\nimport * as i10 from \"@angular/material/chips\";\nimport * as i11 from \"@angular/material/button\";\nimport * as i12 from \"@angular/material/core\";\nimport * as i13 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", 3, \"form\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(7, \"input\", 2);\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"form\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatAutocompleteTrigger, i6.MatAutocomplete, i7.NgForOf, i8.MatSelect, i9.MatInput, i10.MatChipList, i11.MatButton, i12.MatOption, i10.MatChip, i7.NgIf, i13.MatIcon],\n  pipes: [i7.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;ACMM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAA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AA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           [form]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/6ed82a94e91901dbc11157fa218b31b1.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/6ed82a94e91901dbc11157fa218b31b1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/6ed82a94e91901dbc11157fa218b31b1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n      console.log(idContains);\n\n      if (idContains.length > 0) {} else {\n        this.chipsSeletion.push(category.id);\n      }\n    }\n\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAA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AA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   console.log(idContains);\n   if(idContains.length > 0){\n   }else{\n    this.chipsSeletion.push(category.id);\n   }\n  }\n  this.chipsSeletion.push(category.id);\n  console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/70da580870c16df942731e4c4d1fdb3d.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/70da580870c16df942731e4c4d1fdb3d.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/70da580870c16df942731e4c4d1fdb3d.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAA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A;AAAI,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,oCAAA;AAAkC,MAAA,EAAA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/748cf139b34712be0398a856f43144ee.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/748cf139b34712be0398a856f43144ee.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/748cf139b34712be0398a856f43144ee.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/input\";\nimport * as i7 from \"@angular/forms\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = null;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"ngModel\", \"matAutocomplete\", \"ngModelChange\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(7, \"input\", 2);\n      i0.ɵɵlistener(\"ngModelChange\", function LocationsFormComponent_Template_input_ngModelChange_7_listener($event) {\n        return ctx.locationId = $event;\n      });\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"ngModel\", ctx.locationId)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatInput, i7.DefaultValueAccessor, i8.MatAutocompleteTrigger, i7.NgControlStatus, i7.NgModel, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\loc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A,EAAA,EAAA,IAAA;AAAI,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,oCAAA;AAAkC,MAAA,EAAA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,CAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;;;;;;AA/BlD,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA,EAAwB,iBAAxB,EAAwB,GAAxB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = null;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [(ngModel)]=\"locationId\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/788350b9b0548c3186046ddfba7d4e3c.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/788350b9b0548c3186046ddfba7d4e3c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/788350b9b0548c3186046ddfba7d4e3c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n      if (idContains != null) {\n        chip.toggleSelected();\n        this.chipsSeletion.push(category.id);\n        console.log(this.chipsSeletion);\n      }\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.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A,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   chip.toggleSelected();\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n   }\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/793212ee2ecae1416ed55f99a04b4e9b.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/793212ee2ecae1416ed55f99a04b4e9b.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/793212ee2ecae1416ed55f99a04b4e9b.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        this.chipsSeletion.splice();\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAA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,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      this.chipsSeletion.splice()\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/7d72b16ea03e14bcb165fdee940eac51.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/7d72b16ea03e14bcb165fdee940eac51.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/7d72b16ea03e14bcb165fdee940eac51.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      this.chipsSeletion.in;\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,U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AAA,EAAA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    this.chipsSeletion.in\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/81ab6b420cbc7ff7dd365d6aba03fe92.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/81ab6b420cbc7ff7dd365d6aba03fe92.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/81ab6b420cbc7ff7dd365d6aba03fe92.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.ma);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,U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0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.ma)\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/8472a2050daf4835ba2a67959c4035f5.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/8472a2050daf4835ba2a67959c4035f5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/8472a2050daf4835ba2a67959c4035f5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,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AA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = \n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/84f1581ce7a7b1ee9b20470e237d7308.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/84f1581ce7a7b1ee9b20470e237d7308.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/84f1581ce7a7b1ee9b20470e237d7308.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {}\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE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,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      \n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/85a8575ae2b25ec32774f487d4411d24.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/85a8575ae2b25ec32774f487d4411d24.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/85a8575ae2b25ec32774f487d4411d24.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n    this.chipsSeletion.push(c.id);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings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AAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n   this.chipsSeletion.push(c.id)\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/8aff7f8b7075b5a6e694c4ac39a91c79.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/8aff7f8b7075b5a6e694c4ac39a91c79.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/8aff7f8b7075b5a6e694c4ac39a91c79.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,qEAAA,GAAA;AAAA,MAAA,EAAA,CAAA,aAAA,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AAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  ch\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/8ffbb6f44a656dbc32c6a2d5881a2484.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/8ffbb6f44a656dbc32c6a2d5881a2484.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/8ffbb6f44a656dbc32c6a2d5881a2484.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    let idContains = this.chipsSeletion.filter(id => id === category.id);\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA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AA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   let idContains = \n  this.chipsSeletion.filter(id => id === category.id);\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/90af535604244d10b6611fc5c84fd051.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/90af535604244d10b6611fc5c84fd051.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/90af535604244d10b6611fc5c84fd051.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    this.chipsSeletion.filter(id => id === category.id);\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EA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MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   this.chipsSeletion.filter(id => id === category.id);\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/92bfdd06a6e83778c6802bc1219d37ac.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/92bfdd06a6e83778c6802bc1219d37ac.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/92bfdd06a6e83778c6802bc1219d37ac.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {} else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA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AAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/944ec68605e77dd3d0ce59e9e2c987d2.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/944ec68605e77dd3d0ce59e9e2c987d2.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/944ec68605e77dd3d0ce59e9e2c987d2.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {} else {\n      this.chipsSeletion.push();\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,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,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n\n  }else{\n    this.chipsSeletion.push()\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/9832e8b9d9ca9366d90fe0493c2f9ba1.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/9832e8b9d9ca9366d90fe0493c2f9ba1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/9832e8b9d9ca9366d90fe0493c2f9ba1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        this.chipsSeletion;\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,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AAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      this.chipsSeletion\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/9a5be566be60a874126012932544e991.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/9a5be566be60a874126012932544e991.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/9a5be566be60a874126012932544e991.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id)) ;\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,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AA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id))\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/9bea14951b2107df2d0a27a7607d3680.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/9bea14951b2107df2d0a27a7607d3680.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/9bea14951b2107df2d0a27a7607d3680.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    if (this.chipsSeletion.length > 0) {}\n\n    let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n    if (idContains != null) {\n      chip.toggleSelected();\n      console.log(chip);\n      this.chipsSeletion.push(category.id);\n      console.log(this.chipsSeletion);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAc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AA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   if(this.chipsSeletion.length > 0){}\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n   }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/9f57b79f800ef2e2df563c7d35e7410b.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/9f57b79f800ef2e2df563c7d35e7410b.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/9f57b79f800ef2e2df563c7d35e7410b.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {} else {\n      this.chipsSeletion.push(c);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Des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AAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n\n  }else{\n    this.chipsSeletion.push(c)\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/a0fa7932852e0ca652839d11458ec1c1.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/a0fa7932852e0ca652839d11458ec1c1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/a0fa7932852e0ca652839d11458ec1c1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n    this.chipsSeletion.push(c.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE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,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n   this.chipsSeletion.push(c.id);\n   console.log(this.chipsSeletion)\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/a3013bbe0157e8459d3f90f1dec46366.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/a3013bbe0157e8459d3f90f1dec46366.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/a3013bbe0157e8459d3f90f1dec46366.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IA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A,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion)\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/a3389e2451b11c2562a8966b2fd99cba.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/a3389e2451b11c2562a8966b2fd99cba.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/a3389e2451b11c2562a8966b2fd99cba.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n    if (this.chipsSeletion) ;\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA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A,oCAAA;AAAkC,MAAA,EAAA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion)\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/a3d3d05af15b6710b92cc81d74784206.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/a3d3d05af15b6710b92cc81d74784206.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/a3d3d05af15b6710b92cc81d74784206.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n      if (idContains != null) {\n        chip.toggleSelected();\n        console.log(chip);\n        this.chipsSeletion.push(category.id);\n        console.log(this.chipsSeletion);\n      }\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,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AA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n   }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/a5c26dc53e2f718d9cc4f19fec931617.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/a5c26dc53e2f718d9cc4f19fec931617.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/a5c26dc53e2f718d9cc4f19fec931617.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,E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,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/a7dabc7838c5e8275fd94cfbadf8fe80.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/a7dabc7838c5e8275fd94cfbadf8fe80.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/a7dabc7838c5e8275fd94cfbadf8fe80.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,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AAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/a901dd1c56dfe36a4c547fc5caa8f30a.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/a901dd1c56dfe36a4c547fc5caa8f30a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/a901dd1c56dfe36a4c547fc5caa8f30a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n    this.chipsSeletion.push;\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAA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AAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n   this.chipsSeletion.push\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/ab06ef64867923203a5b9ebb34684ddd.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/ab06ef64867923203a5b9ebb34684ddd.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/ab06ef64867923203a5b9ebb34684ddd.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA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,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   \n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/ac2b59da2fd333a694cb087c03ffad09.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/ac2b59da2fd333a694cb087c03ffad09.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/ac2b59da2fd333a694cb087c03ffad09.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    this.chipsSeletion;\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,qEAAA,GAAA;AAAA,YAAA,WAAA,GAAA,EAAA,CAAA,aAAA,CAAA,IAAA,CAAA;AAAA,YAAA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,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   this.chipsSeletion\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/aec8ebc66e1a226879cc8a96ebedc7b1.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/aec8ebc66e1a226879cc8a96ebedc7b1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/aec8ebc66e1a226879cc8a96ebedc7b1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.c);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,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AAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.c)\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/b311b29e4b24b1d141ab68e80cf94429.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/b311b29e4b24b1d141ab68e80cf94429.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/b311b29e4b24b1d141ab68e80cf94429.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n      if (idContains != null) {} else {\n        this.chipsSeletion.push(category.id);\n      }\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,E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AA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   }else{\n    this.chipsSeletion.push(category.id);\n   }\n  }\n  console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/b7a0ddefe68df79c56f7c1795e89b0cb.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/b7a0ddefe68df79c56f7c1795e89b0cb.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/b7a0ddefe68df79c56f7c1795e89b0cb.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n      if (idContains != null) {} else {\n        this.chipsSeletion.push(category.id);\n      }\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,qEAAA,GAAA;AAAA,YAAA,WAAA,GAAA,EAAA,CAAA,aAAA,CAAA,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UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   }else{\n    this.chipsSeletion.push(category.id);\n   }\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/ba0aa9c6416b5fe9abe6340bd43bb02f.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/ba0aa9c6416b5fe9abe6340bd43bb02f.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/ba0aa9c6416b5fe9abe6340bd43bb02f.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.timeLog();\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAA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AAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.timeLog()\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/bb32eb1b4362bd3ff4c59086a9f0630a.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/bb32eb1b4362bd3ff4c59086a9f0630a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/bb32eb1b4362bd3ff4c59086a9f0630a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/forms\";\nimport * as i7 from \"@angular/material/autocomplete\";\nimport * as i8 from \"@angular/common\";\nimport * as i9 from \"@angular/material/select\";\nimport * as i10 from \"@angular/material/input\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", 3, \"ngModel\", \"matAutocomplete\", \"ngModelChange\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(7, \"input\", 2);\n      i0.ɵɵlistener(\"ngModelChange\", function LocationsFormComponent_Template_input_ngModelChange_7_listener($event) {\n        return ctx.locationId = $event;\n      });\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"ngModel\", ctx.locationId)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.DefaultValueAccessor, i7.MatAutocompleteTrigger, i6.NgControlStatus, i6.NgModel, i7.MatAutocomplete, i8.NgForOf, i9.MatSelect, i10.MatInput, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i8.NgIf, i14.MatIcon],\n  pipes: [i8.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACMM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBA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AA,EAAwB,iBAAxB,EAAwB,GAAxB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           [(ngModel)]=\"locationId\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/bdec141d84ac705c13f6fcf42f75fdbe.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/bdec141d84ac705c13f6fcf42f75fdbe.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/bdec141d84ac705c13f6fcf42f75fdbe.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {}\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB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,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){}\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/bfdba5b0b250a6b4b3e316b73ef92385.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/bfdba5b0b250a6b4b3e316b73ef92385.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/bfdba5b0b250a6b4b3e316b73ef92385.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/autocomplete\";\nimport * as i7 from \"@angular/common\";\nimport * as i8 from \"@angular/material/select\";\nimport * as i9 from \"@angular/material/input\";\nimport * as i10 from \"@angular/material/chips\";\nimport * as i11 from \"@angular/material/button\";\nimport * as i12 from \"@angular/material/core\";\nimport * as i13 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", 3, \"]\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(7, \"input\", 2);\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"]\", ctx.locationId)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatAutocompleteTrigger, i6.MatAutocomplete, i7.NgForOf, i8.MatSelect, i9.MatInput, i10.MatChipList, i11.MatButton, i12.MatOption, i10.MatChip, i7.NgIf, i13.MatIcon],\n  pipes: [i7.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"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CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;;;;;;AA/BlD,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,GAAA,EAAA,GAAA,CAAA,UAAA,EAAgB,iBAAhB,EAAgB,GAAhB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           []]=\"locationId\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/c04edbd282de2fef7a6094ad7be6a5f3.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/c04edbd282de2fef7a6094ad7be6a5f3.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/c04edbd282de2fef7a6094ad7be6a5f3.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n    this.chipsSeletion.push(c.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAA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["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n   this.chipsSeletion.push(c.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/c1faffb4387b1719d6ba49da8f935cb1.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/c1faffb4387b1719d6ba49da8f935cb1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/c1faffb4387b1719d6ba49da8f935cb1.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA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AAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/c3a22d294637249f4e8d95eb6f4f2a2c.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/c3a22d294637249f4e8d95eb6f4f2a2c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/c3a22d294637249f4e8d95eb6f4f2a2c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, c) {\n    chip.toggleSelected();\n    console.log(chip); //this.chipsSeletion.push(chip.id);\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb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AAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, c){\n   chip.toggleSelected();\n   console.log(chip);\n   //this.chipsSeletion.push(chip.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/c5f09cb8b5078a3d46df7a06b68c0cfa.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/c5f09cb8b5078a3d46df7a06b68c0cfa.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/c5f09cb8b5078a3d46df7a06b68c0cfa.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA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AA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/c731f6654a4aeb25fa42242a4db86d6f.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/c731f6654a4aeb25fa42242a4db86d6f.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/c731f6654a4aeb25fa42242a4db86d6f.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf;\n        this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,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,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf\n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/ca08dc9e36ffc09dfffa5d763a4cdda5.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/ca08dc9e36ffc09dfffa5d763a4cdda5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/ca08dc9e36ffc09dfffa5d763a4cdda5.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n    console.log(chip); //this.chipsSeletion.push(chip.id);\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,E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;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category){\n   chip.toggleSelected();\n   console.log(chip);\n   //this.chipsSeletion.push(chip.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/ce84ff0b5ecc306f65458dcf193189d0.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/ce84ff0b5ecc306f65458dcf193189d0.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/ce84ff0b5ecc306f65458dcf193189d0.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n    this.chipsSeletion.push(c.id);\n    console.log();\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAA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AA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n   this.chipsSeletion.push(c.id);\n   console.log()\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/d13418208eaff070a0ceb2b120bb9f7b.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/d13418208eaff070a0ceb2b120bb9f7b.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/d13418208eaff070a0ceb2b120bb9f7b.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n      console.log(idContains);\n\n      if (idContains != null) {} else {\n        this.chipsSeletion.push(category.id);\n      }\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings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A,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   console.log(idContains);\n   if(idContains != null){\n   }else{\n    this.chipsSeletion.push(category.id);\n   }\n  }\n  console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/d1d5daada29612151c5d935b6860d7ea.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/d1d5daada29612151c5d935b6860d7ea.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/d1d5daada29612151c5d935b6860d7ea.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    this.chipsSeletion.map(x => x.id).filter();\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA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,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   this.chipsSeletion.map(x => x.id).filter()\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/d2158cd9bc077658f30d912994293185.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/d2158cd9bc077658f30d912994293185.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/d2158cd9bc077658f30d912994293185.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {} else {}\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,qEAAA,GAAA;AAAA,YA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A;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n\n  }else{\n    \n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/d2aa6438644eab2caccc699647504b84.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/d2aa6438644eab2caccc699647504b84.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/d2aa6438644eab2caccc699647504b84.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n      if (idContains != null) {\n        this.chipsSeletion.push(category.id);\n        console.log(this.chipsSeletion);\n      }\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA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A,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n   }\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/d30cef0c216e30e0ff3f78e6bc3a972f.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/d30cef0c216e30e0ff3f78e6bc3a972f.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/d30cef0c216e30e0ff3f78e6bc3a972f.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/autocomplete\";\nimport * as i7 from \"@angular/common\";\nimport * as i8 from \"@angular/material/select\";\nimport * as i9 from \"@angular/material/input\";\nimport * as i10 from \"@angular/material/chips\";\nimport * as i11 from \"@angular/material/button\";\nimport * as i12 from \"@angular/material/core\";\nimport * as i13 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 7,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"[()]\", \"\", 3, \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(7, \"input\", 2);\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 5, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatAutocompleteTrigger, i6.MatAutocomplete, i7.NgForOf, i8.MatSelect, i9.MatInput, i10.MatChipList, i11.MatButton, i12.MatOption, i10.MatChip, i7.NgIf, i13.MatIcon],\n  pipes: [i7.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;ACMM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,qEAAA,GAAA;AAAA,YAAA,WAAA,GAAA,EAAA,CAAA,aAAA,CAA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AAA,eAAA,EAAA,CAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;;;;;;AA9BlD,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,iBAAA,EAAA,GAAA;AAE0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           [()]\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/d33e86ab9ff54f877ca65d1a8d48bd91.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/d33e86ab9ff54f877ca65d1a8d48bd91.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/d33e86ab9ff54f877ca65d1a8d48bd91.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n      console;\n\n      if (idContains != null) {} else {\n        this.chipsSeletion.push(category.id);\n      }\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,C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CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   console\n   if(idContains != null){\n   }else{\n    this.chipsSeletion.push(category.id);\n   }\n  }\n  console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/d437c59c043318b99c737d2085114526.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/d437c59c043318b99c737d2085114526.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/d437c59c043318b99c737d2085114526.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {} else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA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, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    \n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/d507382986151ab053253657bc29ea02.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/d507382986151ab053253657bc29ea02.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/d507382986151ab053253657bc29ea02.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      this.chipsSeletion;\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;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,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    this.chipsSeletion\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/d8c6db71763550a5a4cc1b9ce981eadb.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/d8c6db71763550a5a4cc1b9ce981eadb.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/d8c6db71763550a5a4cc1b9ce981eadb.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EA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A,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/da00f083d75fb91166195ab354fbc92c.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/da00f083d75fb91166195ab354fbc92c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/da00f083d75fb91166195ab354fbc92c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n      if (idContains != null) {}\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAA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ASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   }\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/da12ff7dc016e4c4516e3f333b8c2ad6.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/da12ff7dc016e4c4516e3f333b8c2ad6.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/da12ff7dc016e4c4516e3f333b8c2ad6.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    this.chipsSeletion.map(x => x.id).filter(id => id === category.id);\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAA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,EAAA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   this.chipsSeletion.map(x => x.id).filter(id => id === category.id);\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/dad9ded988c8cc5d821b3073a9444ec9.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/dad9ded988c8cc5d821b3073a9444ec9.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/dad9ded988c8cc5d821b3073a9444ec9.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAA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,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/df9e02f0ba4344fca3e416e0c1db0575.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/df9e02f0ba4344fca3e416e0c1db0575.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/df9e02f0ba4344fca3e416e0c1db0575.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n      if (idContains != null) {} else ;\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,G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AA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   }else\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/dfaf98716da08523fd1f551779fec031.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/dfaf98716da08523fd1f551779fec031.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/dfaf98716da08523fd1f551779fec031.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/input\";\nimport * as i7 from \"@angular/forms\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.id);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"ngModel\", \"matAutocomplete\", \"ngModelChange\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(7, \"input\", 2);\n      i0.ɵɵlistener(\"ngModelChange\", function LocationsFormComponent_Template_input_ngModelChange_7_listener($event) {\n        return ctx.locationId = $event;\n      });\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"ngModel\", ctx.locationId)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatInput, i7.DefaultValueAccessor, i8.MatAutocompleteTrigger, i7.NgControlStatus, i7.NgModel, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACQM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAA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AA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [(ngModel)]=\"locationId\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.id\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/e0873916eb90232c49735f0ffcb4138c.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/e0873916eb90232c49735f0ffcb4138c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/e0873916eb90232c49735f0ffcb4138c.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/input\";\nimport * as i7 from \"@angular/forms\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 8,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"ngModel\", \"matAutocomplete\", \"ngModelChange\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(7, \"input\", 2);\n      i0.ɵɵlistener(\"ngModelChange\", function LocationsFormComponent_Template_input_ngModelChange_7_listener($event) {\n        return ctx.locationId = $event;\n      });\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"ngModel\", ctx.locationId)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatInput, i7.DefaultValueAccessor, i8.MatAutocompleteTrigger, i7.NgControlStatus, i7.NgModel, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACQM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,I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AAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [(ngModel)]=\"locationId\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/e29c36d4d239cfb32f2aac818e8a2fd3.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/e29c36d4d239cfb32f2aac818e8a2fd3.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/e29c36d4d239cfb32f2aac818e8a2fd3.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.n);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,c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import { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.n)\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/e4d6ba4a621c2f7650f0333de110df7e.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/e4d6ba4a621c2f7650f0333de110df7e.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/e4d6ba4a621c2f7650f0333de110df7e.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n      if (idContains != null) {\n        this.chipsSeletion.push(category.id);\n        console.log(this.chipsSeletion);\n      }\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thes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A,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n   }\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/e61aacc9c4173710a8aa4e3442b2f716.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/e61aacc9c4173710a8aa4e3442b2f716.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/e61aacc9c4173710a8aa4e3442b2f716.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAA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AAA,EAAA,IAAA;AAAI,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,oCAAA;AAAkC,MAAA,EAAA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/e657b92ed0cee8d3235ff7823fbc52f3.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/e657b92ed0cee8d3235ff7823fbc52f3.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/e657b92ed0cee8d3235ff7823fbc52f3.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n    console.log(chip); //this.chipsSeletion.push(chip.id);\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,E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A,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   chip.toggleSelected();\n   console.log(chip);\n   //this.chipsSeletion.push(chip.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/e6d4b6bfd84858b8d2c115aab5e35749.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/e6d4b6bfd84858b8d2c115aab5e35749.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/e6d4b6bfd84858b8d2c115aab5e35749.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    let idContains;\n    this.chipsSeletion.filter(id => id === category.id);\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA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MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   let idContains \n  this.chipsSeletion.filter(id => id === category.id);\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/e9da7078d0653a1d9d13a0155b8d190e.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/e9da7078d0653a1d9d13a0155b8d190e.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/e9da7078d0653a1d9d13a0155b8d190e.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACWM,IA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AA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAjCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAI0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n        \n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/ec83f4b87e40294430d04355bc589ec3.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/ec83f4b87e40294430d04355bc589ec3.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/ec83f4b87e40294430d04355bc589ec3.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EA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;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/ece0e8a9f9eae98339b2d9dc729c7ca9.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/ece0e8a9f9eae98339b2d9dc729c7ca9.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/ece0e8a9f9eae98339b2d9dc729c7ca9.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion;\n        this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF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AA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion\n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/eec42f4f310b718d68e70bea29bc1a38.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/eec42f4f310b718d68e70bea29bc1a38.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/eec42f4f310b718d68e70bea29bc1a38.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n      console.log(idContains);\n\n      if (idContains) {} else {\n        this.chipsSeletion.push(category.id);\n      }\n    }\n\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAA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A,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   console.log(idContains);\n   if(idContains){\n   }else{\n    this.chipsSeletion.push(category.id);\n   }\n  }\n  this.chipsSeletion.push(category.id);\n  console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/f08e75e73df30e09b503d6bd8d1ca5fe.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/f08e75e73df30e09b503d6bd8d1ca5fe.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/f08e75e73df30e09b503d6bd8d1ca5fe.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n      console.log();\n\n      if (idContains != null) {} else {\n        this.chipsSeletion.push(category.id);\n      }\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EA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UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   console.log()\n   if(idContains != null){\n   }else{\n    this.chipsSeletion.push(category.id);\n   }\n  }\n  console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/f1bc876de13895b22ed72853c1cf1939.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/f1bc876de13895b22ed72853c1cf1939.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/f1bc876de13895b22ed72853c1cf1939.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n      chip.toggleSelected();\n\n      if (idContains != null) {\n        this.chipsSeletion.push(category.id);\n        console.log(this.chipsSeletion);\n      }\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,qEAAA,GAAA;AAAA,YAAA,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,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   chip.toggleSelected();\n   if(idContains != null){\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n   }\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/f1eb3780e5467595c5963916c8c37048.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/f1eb3780e5467595c5963916c8c37048.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/f1eb3780e5467595c5963916c8c37048.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n    console.log(chip); //this.chipsSeletion.push(chip.id);\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,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B,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n   console.log(chip);\n   //this.chipsSeletion.push(chip.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/f2d6feca75ac585596961ff93010f610.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/f2d6feca75ac585596961ff93010f610.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/f2d6feca75ac585596961ff93010f610.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      this;\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form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AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    this\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/f331d3eb6cff015c3b20d24599f46102.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/f331d3eb6cff015c3b20d24599f46102.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/f331d3eb6cff015c3b20d24599f46102.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,C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SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/f3cc310f0cf0959b45765240fbca879d.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/f3cc310f0cf0959b45765240fbca879d.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/f3cc310f0cf0959b45765240fbca879d.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      this.chipsSeletion.indexOf(category.id);\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAA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A;AAAkC,MAAA,EAAA,CAAA,YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    this.chipsSeletion.indexOf(category.id)\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/f47244b0c9f81f38794d86a6e3724c57.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/f47244b0c9f81f38794d86a6e3724c57.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/f47244b0c9f81f38794d86a6e3724c57.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,Q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iB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n console.log()\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/f5ad0f790114d16d089325003832cc2b.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/f5ad0f790114d16d089325003832cc2b.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/f5ad0f790114d16d089325003832cc2b.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    this.chipsSeletion.map(x => x.id).filter;\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;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AA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   this.chipsSeletion.map(x => x.id).filter\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/f8830ecde9295f18bf2069353cee959a.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/f8830ecde9295f18bf2069353cee959a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/f8830ecde9295f18bf2069353cee959a.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      this.chipsSeletion.indexOf;\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA,EAAA,OAAA;AAAK,IAAA,EAAA,CAAA,YAAA;;;;;;;;AAFhC,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA,EAAA,EAAA,EAAA,EAAA;AACA,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,qEAAA,GAAA;AAAA,YAAA,WAAA,GAAA,EAAA,CAAA,aAAA,CAAA,IA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AAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AAhCW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    this.chipsSeletion.indexOf\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/f9466031991a4ada4e33bdb5bf2db453.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/f9466031991a4ada4e33bdb5bf2db453.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/f9466031991a4ada4e33bdb5bf2db453.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        this.chipsSeletion.splice(category.id, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log;\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAA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,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      this.chipsSeletion.splice(category.id, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/fa41b3b1b58ee3c28b474d23894eb4f6.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/fa41b3b1b58ee3c28b474d23894eb4f6.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/fa41b3b1b58ee3c28b474d23894eb4f6.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/autocomplete\";\nimport * as i7 from \"@angular/common\";\nimport * as i8 from \"@angular/material/select\";\nimport * as i9 from \"@angular/material/input\";\nimport * as i10 from \"@angular/material/chips\";\nimport * as i11 from \"@angular/material/button\";\nimport * as i12 from \"@angular/material/core\";\nimport * as i13 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_10_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 12);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_28_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 14, 15);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_28_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_28_mat_icon_2_Template, 2, 0, \"mat-icon\", 16);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 31,\n  vars: 7,\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\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"fo]\", \"locationId\", 3, \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"label\");\n      i0.ɵɵelementStart(2, \"h5\");\n      i0.ɵɵtext(3, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(4, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(5, \"mat-label\");\n      i0.ɵɵtext(6, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(7, \"input\", 2);\n      i0.ɵɵelementStart(8, \"mat-autocomplete\", 3, 4);\n      i0.ɵɵtemplate(10, LocationsFormComponent_mat_option_10_Template, 2, 2, \"mat-option\", 5);\n      i0.ɵɵpipe(11, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(12, \"h5\");\n      i0.ɵɵtext(13, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(14, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(15, \"mat-label\");\n      i0.ɵɵtext(16, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(17, \"mat-select\", 6);\n      i0.ɵɵtemplate(18, LocationsFormComponent_mat_option_18_Template, 2, 1, \"mat-option\", 7);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(19, \"h5\");\n      i0.ɵɵtext(20, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(21, \"mat-form-field\", 1);\n      i0.ɵɵelementStart(22, \"mat-label\");\n      i0.ɵɵtext(23, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(24, \"input\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(25, \"h5\");\n      i0.ɵɵtext(26, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(27, \"mat-chip-list\", 9);\n      i0.ɵɵtemplate(28, LocationsFormComponent_mat_chip_28_Template, 4, 2, \"mat-chip\", 10);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(29, \"button\", 11);\n      i0.ɵɵtext(30, \"Create my planner\");\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(9);\n\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(11, 5, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.MatFormField, i5.MatLabel, i6.MatAutocompleteTrigger, i6.MatAutocomplete, i7.NgForOf, i8.MatSelect, i9.MatInput, i10.MatChipList, i11.MatButton, i12.MatOption, i10.MatChip, i7.NgIf, i13.MatIcon],\n  pipes: [i7.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;ACMM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA;;;;;AAAlB,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,IAAA;;;;;;AAcrE,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,UAAA;AAA6B,IAAA,EAAA,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'@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n  locationId: number;\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n    this.locationId = 1;\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           fo]=\"locationId\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/fa4b30362f755e576f0488d9f2710fba.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/fa4b30362f755e576f0488d9f2710fba.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/fa4b30362f755e576f0488d9f2710fba.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      if (this.chipsSeletion.indexOf(category.id) <= -1) {\n        this.chipsSeletion.push(category.id);\n      } else {\n        const index = this.chipsSeletion.indexOf(category.id);\n        this.chipsSeletion.splice(index, 1);\n      }\n    } else {\n      this.chipsSeletion.push(category.id);\n    }\n\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 7,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", \"[()]\", \"\", 3, \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 5, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i8.MatAutocompleteTrigger, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","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YAAA;AACvC,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,eAAA,EAAA,EAAA;AACE,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,2CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,EAAA;AAKF,MAAA,EAAA,CAAA,YAAA;AACA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA;AAA0C,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,mBAAA;AAAiB,MAAA,EAAA,CAAA,YAAA;AAC7D,MAAA,EAAA,CAAA,YAAA;;;;;;AA/BW,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,iBAAA,EAAA,GAAA;AAE0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n  if(this.chipsSeletion.length > 0){\n    if(this.chipsSeletion.indexOf(category.id) <= -1){\n      this.chipsSeletion.push(category.id);\n    }else{\n      const index = this.chipsSeletion.indexOf(category.id);\n      this.chipsSeletion.splice(index, 1);\n    }\n  }else{\n    this.chipsSeletion.push(category.id);\n  }\n  console.log(this.chipsSeletion);\n }\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [()]\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/fbb20e29d76df3eeb47dd514953110f4.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/fbb20e29d76df3eeb47dd514953110f4.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/fbb20e29d76df3eeb47dd514953110f4.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      i0.ɵɵrestoreView(_r10);\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip) {\n    chip.toggleSelected();\n    this.chipsSeletion.p;\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA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AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip){\n   chip.toggleSelected();\n   this.chipsSeletion.p\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/fea1262434f1bdad7686aecfced489d3.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/fea1262434f1bdad7686aecfced489d3.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/fea1262434f1bdad7686aecfced489d3.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    this.chipsSeletion.map(x);\n    chip.toggleSelected();\n    console.log(chip);\n    this.chipsSeletion.push(category.id);\n    console.log(this.chipsSeletion);\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,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AAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,aAAA,EAAA,GAAA,CAAA,SAAA,EAAyB,iBAAzB,EAAyB,GAAzB;AAG0B,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA;AASrB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAYgB,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n   this.chipsSeletion.map(x)\n   chip.toggleSelected();\n   console.log(chip);\n   this.chipsSeletion.push(category.id);\n   console.log(this.chipsSeletion);\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Index: trip-planner-front/node_modules/.cache/babel-webpack/ff709d0d589495ea267656fdce760bdc.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/ff709d0d589495ea267656fdce760bdc.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
+++ trip-planner-front/node_modules/.cache/babel-webpack/ff709d0d589495ea267656fdce760bdc.json	(revision eed0bf860deec9614c6d4891e655270e2bb3b8ab)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/button\";\nimport * as i13 from \"@angular/material/core\";\nimport * as i14 from \"@angular/material/icon\";\n\nfunction LocationsFormComponent_mat_option_11_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 13);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r4 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r4.name);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n  }\n}\n\nfunction LocationsFormComponent_mat_option_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-option\", 14);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const companion_r5 = ctx.$implicit;\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate(companion_r5.type);\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_mat_icon_2_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"mat-icon\");\n    i0.ɵɵtext(1, \"check\");\n    i0.ɵɵelementEnd();\n  }\n}\n\nfunction LocationsFormComponent_mat_chip_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r10 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-chip\", 15, 16);\n    i0.ɵɵlistener(\"click\", function LocationsFormComponent_mat_chip_29_Template_mat_chip_click_0_listener() {\n      const restoredCtx = i0.ɵɵrestoreView(_r10);\n      const category_r6 = restoredCtx.$implicit;\n\n      const _r7 = i0.ɵɵreference(1);\n\n      const ctx_r9 = i0.ɵɵnextContext();\n      return ctx_r9.toggleSelection(_r7, category_r6);\n    });\n    i0.ɵɵtemplate(2, LocationsFormComponent_mat_chip_29_mat_icon_2_Template, 2, 0, \"mat-icon\", 17);\n    i0.ɵɵtext(3);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const category_r6 = ctx.$implicit;\n\n    const _r7 = i0.ɵɵreference(1);\n\n    i0.ɵɵadvance(2);\n    i0.ɵɵproperty(\"ngIf\", _r7.selected);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", category_r6.name, \" \");\n  }\n}\n\nexport class LocationsFormComponent {\n  constructor(cityService, countryService, companionService, categoryService) {\n    this.cityService = cityService;\n    this.countryService = countryService;\n    this.companionService = companionService;\n    this.categoryService = categoryService;\n    this.myControl = new FormControl();\n    this.disableSelect = new FormControl(false);\n    this.filteredOptions = new Observable();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n\n  ngOnInit() {\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n      return this.filter(val || '');\n    }));\n    this.categoryService.getAllCategories().subscribe(data => {\n      this.categories = data;\n    });\n    this.companionService.getAllCompanions().subscribe(data => {\n      this.companions = data;\n    });\n  }\n\n  filter(val) {\n    // call the service which makes the http-request\n    return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n    })));\n  }\n\n  toggleSelection(chip, category) {\n    chip.toggleSelected();\n\n    if (this.chipsSeletion.length > 0) {\n      let idContains = this.chipsSeletion.filter(id => id === category.id);\n\n      if (idContains != null) {\n        this.chipsSeletion.push(category.id);\n      }\n    }\n  }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n  return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: LocationsFormComponent,\n  selectors: [[\"app-locations-form\"]],\n  decls: 32,\n  vars: 8,\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\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"matInput\", \"\", \"placeholder\", \"No. Dys\", \"type\", \"number\"], [\"selectable\", \"\", \"multiple\", \"\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"mat-raised-button\", \"\", \"color\", \"primary\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\", 3, \"click\"], [\"c\", \"matChip\"], [4, \"ngIf\"]],\n  template: function LocationsFormComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"form\", 1);\n      i0.ɵɵelementStart(2, \"label\");\n      i0.ɵɵelementStart(3, \"h5\");\n      i0.ɵɵtext(4, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(5, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(6, \"mat-label\");\n      i0.ɵɵtext(7, \"Please select a place\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(8, \"input\", 3);\n      i0.ɵɵelementStart(9, \"mat-autocomplete\", 4, 5);\n      i0.ɵɵtemplate(11, LocationsFormComponent_mat_option_11_Template, 2, 2, \"mat-option\", 6);\n      i0.ɵɵpipe(12, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(13, \"h5\");\n      i0.ɵɵtext(14, \"Who are you travelling with? \");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(15, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(16, \"mat-label\");\n      i0.ɵɵtext(17, \"Please select a companion\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(18, \"mat-select\", 7);\n      i0.ɵɵtemplate(19, LocationsFormComponent_mat_option_19_Template, 2, 1, \"mat-option\", 8);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"h5\");\n      i0.ɵɵtext(21, \"How many days are you willing to stay ?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(22, \"mat-form-field\", 2);\n      i0.ɵɵelementStart(23, \"mat-label\");\n      i0.ɵɵtext(24, \"Please select a number of days\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelement(25, \"input\", 9);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(26, \"h5\");\n      i0.ɵɵtext(27, \"What are your priorities to visit?\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(28, \"mat-chip-list\", 10);\n      i0.ɵɵtemplate(29, LocationsFormComponent_mat_chip_29_Template, 4, 2, \"mat-chip\", 11);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(30, \"button\", 12);\n      i0.ɵɵtext(31, \"Create my planner\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(10);\n\n      i0.ɵɵadvance(8);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n      i0.ɵɵadvance(3);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(12, 6, ctx.filteredOptions));\n      i0.ɵɵadvance(7);\n      i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n      i0.ɵɵadvance(10);\n      i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n    }\n  },\n  directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatButton, i13.MatOption, i11.MatChip, i9.NgIf, i14.MatIcon],\n  pipes: [i9.AsyncPipe],\n  styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n  min-width: 150px;\\r\\n  max-width: 380px;\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n  width: 100%;\\r\\n}\\r\\n\\r\\nmat-icon[_ngcontent-%COMP%] {\\r\\n  height: 20px;\\r\\n  width: 20px;\\r\\n  font-size: 20px;\\r\\n  margin-right: 5px;\\r\\n}\\r\\n\\r\\nbutton[_ngcontent-%COMP%]{\\r\\n  float: right;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFlBQVk7RUFDWixXQUFXO0VBQ1gsZUFBZTtFQUNmLGlCQUFpQjtBQUNuQjs7QUFDQTtFQUNFLFlBQVk7QUFDZCIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM4MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxubWF0LWljb24ge1xyXG4gIGhlaWdodDogMjBweDtcclxuICB3aWR0aDogMjBweDtcclxuICBmb250LXNpemU6IDIwcHg7XHJcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XHJcbn1cclxuYnV0dG9ue1xyXG4gIGZsb2F0OiByaWdodDtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;;;ACUM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,CAAA,IAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;;;AASF,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,EAAA;AAAiE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AAAkB,IAAA,EAAA,CAAA,YAAA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,SAAA,CAAA,EAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\nimport { MatChip } from '@angular/material/chips';\n\n@Component({\n  selector: 'app-locations-form',\n  templateUrl: './locations-form.component.html',\n  styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n  myControl = new FormControl();\n  cities: City[];\n  countries: Country[];\n  companions: Companion[];\n  categories: Category[];\n  filteredOptions: Observable<City[]>;\n  disableSelect = new FormControl(false);\n  chipsSeletion: number[];\n\n  constructor(private cityService : CityService, private countryService : CountryService,\n              private companionService : CompanionService, private categoryService : CategoryService){\n    this.filteredOptions = new Observable<City[]>();\n    this.cities = [];\n    this.countries = [];\n    this.companions = [];\n    this.categories = [];\n    this.chipsSeletion = [];\n  }\n  \n  ngOnInit() :void {\n    this.filteredOptions = this.myControl.valueChanges\n    .pipe(\n      startWith(''),\n      switchMap(val => {\n        return this.filter(val || '')\n      })       \n    );\n\n    this.categoryService.getAllCategories().subscribe(\n      data => {\n        this.categories = data;\n      }\n    );\n\n    this.companionService.getAllCompanions().subscribe(\n      data => {\n        this.companions = data;\n      }\n    )\n  }\n  \n  filter(val: string): Observable<City[]> {\n  // call the service which makes the http-request\n    return this.cityService.getAllCities()\n    .pipe(\n    map(response => response.filter(option => { \n      return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n    }))\n  )\n  \n }  \n\n toggleSelection(chip: MatChip, category: Category){\n  chip.toggleSelected();\n   if(this.chipsSeletion.length > 0){\n   let idContains =  this.chipsSeletion.filter(id => id === category.id);\n   if(idContains != null){\n   this.chipsSeletion.push(category.id);\n   }\n  }\n }\n\n}\n","<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\" crossorigin=\"anonymous\">\n\n<form class=\"example-form\">\n  <label><h5>Please select a place</h5></label>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a place</mat-label>\n    <input type=\"text\"\n           placeholder=\"Pick one\"\n           aria-label=\"Place\"\n           matInput\n           [formControl]=\"myControl\"\n           [matAutocomplete]=\"auto\">\n    <mat-autocomplete autoActiveFirstOption  #auto=\"matAutocomplete\">\n      <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n        {{option.name}}\n      </mat-option>\n    </mat-autocomplete>\n  </mat-form-field>\n\n  <h5>Who are you travelling with?  </h5>\n  <mat-form-field appearance=\"fill\" class=\"example-full-width\">\n    <mat-label>Please select a companion</mat-label>\n    <mat-select [disabled]=\"disableSelect.value\">\n      <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n    </mat-select>\n  </mat-form-field>\n\n  <h5>How many days are you willing to stay ?</h5>\n  <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n    <mat-label>Please select a number of days</mat-label>\n    <input matInput placeholder=\"No. Dys\"  type=\"number\">\n  </mat-form-field>\n\n   <h5>What are your priorities to visit?</h5> \n  <mat-chip-list  selectable multiple>\n    <mat-chip #c=\"matChip\" color=\"accent\" selected *ngFor=\"let category of categories\" \n    (click)=\"toggleSelection(c, category)\">\n  <mat-icon *ngIf=\"c.selected\">check</mat-icon>\n  {{category.name}}\n  </mat-chip>\n  </mat-chip-list>\n  <button mat-raised-button color=\"primary\">Create my planner</button>\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
