marketplacepos 2.2.9 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/Marketplace/126.cdcda87dcc3da677.js +1 -0
  2. package/Marketplace/170.f2067bfd5ecb2a86.js +1 -0
  3. package/Marketplace/22.738096d8317ec65b.js +1 -0
  4. package/Marketplace/231.adb8d56e26375a9c.js +1 -0
  5. package/Marketplace/285.17f6cbef78acd327.js +1 -0
  6. package/Marketplace/3rdpartylicenses.txt +490 -0
  7. package/Marketplace/46.8652d978a45ce5ab.js +1 -0
  8. package/Marketplace/472.519965afdb7a160d.js +1 -0
  9. package/Marketplace/512.eddb4675a9016de6.js +1 -0
  10. package/Marketplace/518.aff0cf9876e146d2.js +1 -0
  11. package/Marketplace/585.c93552ac67f4550c.js +1 -0
  12. package/Marketplace/6.fc79ecc0c0a33462.js +1 -0
  13. package/Marketplace/616.507588c0a5d7b9e1.js +1 -0
  14. package/Marketplace/717.62ca448a74adc1c2.js +1 -0
  15. package/Marketplace/739.82b92600f9519019.js +1 -0
  16. package/Marketplace/763.42fa4c0d665819d3.js +1 -0
  17. package/Marketplace/767.0ce42314dea8dfea.js +1 -0
  18. package/Marketplace/796.3be8ad424aad7864.js +1 -0
  19. package/Marketplace/common.34d3e7dcd2b85c7a.js +1 -0
  20. package/Marketplace/index.html +22 -23
  21. package/Marketplace/main.6481a1f35d927562.js +1 -0
  22. package/Marketplace/polyfills.8d85b0533e3f867a.js +1 -0
  23. package/Marketplace/runtime.ba5c4b46d4312c5e.js +1 -0
  24. package/Marketplace/scripts.512baec01df5d79f.js +1 -0
  25. package/Marketplace/styles.d8aa52b2e9cd02ae.css +39 -0
  26. package/package.json +1 -1
  27. package/Marketplace/common.js +0 -46
  28. package/Marketplace/common.js.map +0 -1
  29. package/Marketplace/default-node_modules_angular_forms_fesm2020_forms_mjs.js +0 -9551
  30. package/Marketplace/default-node_modules_angular_forms_fesm2020_forms_mjs.js.map +0 -1
  31. package/Marketplace/default-node_modules_angular_material_fesm2020_paginator_mjs.js +0 -797
  32. package/Marketplace/default-node_modules_angular_material_fesm2020_paginator_mjs.js.map +0 -1
  33. package/Marketplace/default-node_modules_ng-select_ng-select_fesm2020_ng-select-ng-select_mjs.js +0 -4632
  34. package/Marketplace/default-node_modules_ng-select_ng-select_fesm2020_ng-select-ng-select_mjs.js.map +0 -1
  35. package/Marketplace/default-src_app_menu_nav-tab_nav-tab_component_ts-node_modules_angular_material_fesm2020_date-e7a231.js +0 -6836
  36. package/Marketplace/default-src_app_menu_nav-tab_nav-tab_component_ts-node_modules_angular_material_fesm2020_date-e7a231.js.map +0 -1
  37. package/Marketplace/default-src_app_menu_nav-tab_nav-tab_component_ts-node_modules_angular_material_fesm2020_slid-566c11.js +0 -722
  38. package/Marketplace/default-src_app_menu_nav-tab_nav-tab_component_ts-node_modules_angular_material_fesm2020_slid-566c11.js.map +0 -1
  39. package/Marketplace/default-src_app_sharing-module_datepicker_datepicker_component_ts.js +0 -19951
  40. package/Marketplace/default-src_app_sharing-module_datepicker_datepicker_component_ts.js.map +0 -1
  41. package/Marketplace/main.js +0 -617
  42. package/Marketplace/main.js.map +0 -1
  43. package/Marketplace/polyfills.js +0 -3398
  44. package/Marketplace/polyfills.js.map +0 -1
  45. package/Marketplace/runtime.js +0 -346
  46. package/Marketplace/runtime.js.map +0 -1
  47. package/Marketplace/scripts.js +0 -2634
  48. package/Marketplace/scripts.js.map +0 -1
  49. package/Marketplace/src_app_login_login_module_ts.js +0 -538
  50. package/Marketplace/src_app_login_login_module_ts.js.map +0 -1
  51. package/Marketplace/src_app_menu_ReportOrder_report_module_ts.js +0 -1060
  52. package/Marketplace/src_app_menu_ReportOrder_report_module_ts.js.map +0 -1
  53. package/Marketplace/src_app_menu_channels_channels_module_ts.js +0 -9710
  54. package/Marketplace/src_app_menu_channels_channels_module_ts.js.map +0 -1
  55. package/Marketplace/src_app_menu_inventory_inventory_module_ts.js +0 -1069
  56. package/Marketplace/src_app_menu_inventory_inventory_module_ts.js.map +0 -1
  57. package/Marketplace/src_app_menu_logistic_logistic_module_ts.js +0 -232
  58. package/Marketplace/src_app_menu_logistic_logistic_module_ts.js.map +0 -1
  59. package/Marketplace/src_app_menu_menu_module_ts.js +0 -38973
  60. package/Marketplace/src_app_menu_menu_module_ts.js.map +0 -1
  61. package/Marketplace/src_app_menu_notification_notification_module_ts.js +0 -192
  62. package/Marketplace/src_app_menu_notification_notification_module_ts.js.map +0 -1
  63. package/Marketplace/src_app_menu_object-log_logs_module_ts.js +0 -1997
  64. package/Marketplace/src_app_menu_object-log_logs_module_ts.js.map +0 -1
  65. package/Marketplace/src_app_menu_orders_orders_module_ts.js +0 -2449
  66. package/Marketplace/src_app_menu_orders_orders_module_ts.js.map +0 -1
  67. package/Marketplace/src_app_menu_price_price_module_ts.js +0 -1713
  68. package/Marketplace/src_app_menu_price_price_module_ts.js.map +0 -1
  69. package/Marketplace/src_app_menu_products_product_module_ts.js +0 -2196
  70. package/Marketplace/src_app_menu_products_product_module_ts.js.map +0 -1
  71. package/Marketplace/styles.css +0 -30612
  72. package/Marketplace/styles.css.map +0 -1
  73. package/Marketplace/vendor.js +0 -71753
  74. package/Marketplace/vendor.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"src_app_menu_channels_channels_module_ts.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAC+C;AACQ;AACE;AACkB;AACnB;AAC6C;AACA;AACG;AACN;AAC/C;AACO;;;AAE1D,MAAM,MAAM,GAAW;IACrB;QACE,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,kEAAiB;QAC5B,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,EAAE;gBACR,UAAU,EAAE,aAAa;gBACzB,SAAS,EAAE,MAAM;aAClB;YACD;gBACE,IAAI,EAAE,aAAa;gBACnB,SAAS,EAAE,oFAAoB;gBAC/B,WAAW,EAAE,CAAC,kEAAS,CAAC;gBACxB,IAAI,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AJZ,CAAD;EAFsG,CAAD,CAAvH;AAAA;AAkBA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA","sources":["./src/app/menu/channels/channels-routing.module.ts","./src/app/menu/channels/channels.component.ts","./src/app/menu/channels/channels.component.html","./src/app/menu/channels/channels.module.ts","./src/app/menu/channels/marketplace/marketplace-add/marketplace-add.component.ts","./src/app/menu/channels/marketplace/marketplace-add/marketplace-add.component.html","./src/app/menu/channels/marketplace/marketplace-cache/marketplace-cache.component.ts","./src/app/menu/channels/marketplace/marketplace-cache/marketplace-cache.component.html","./src/app/menu/channels/marketplace/marketplace-form/marketplace-form.component.ts","./src/app/menu/channels/marketplace/marketplace-form/marketplace-form.component.html","./src/app/menu/channels/marketplace/marketplace-view/marketplace-view.component.ts","./src/app/menu/channels/marketplace/marketplace-view/marketplace-view.component.html","./src/app/menu/channels/marketplace/marketplace.component.ts","./src/app/menu/channels/marketplace/marketplace.component.html","./src/app/menu/channels/pos/edit/edit.component.ts","./src/app/menu/channels/pos/edit/edit.component.html","./src/app/menu/channels/pos/pos.component.ts","./src/app/menu/channels/pos/pos.component.html","./src/app/menu/nav-tab/nav-tab.component.ts","./src/app/menu/nav-tab/nav-tab.component.html","./node_modules/rxjs/dist/esm/internal/observable/interval.js","./node_modules/@angular/cdk/fesm2020/drag-drop.mjs","./node_modules/@angular/material/fesm2020/chips.mjs"],"sourcesContent":["import { NgModule } from \"@angular/core\";\r\nimport { CommonModule } from \"@angular/common\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { ChannelsComponent } from \"./channels.component\";\r\nimport { MarketplaceComponent } from \"./marketplace/marketplace.component\";\r\nimport { AuthGuard } from \"src/app/services/auth.guard\";\r\nimport { MarketplaceFormComponent } from \"./marketplace/marketplace-form/marketplace-form.component\";\r\nimport { MarketplaceViewComponent } from \"./marketplace/marketplace-view/marketplace-view.component\";\r\nimport { MarketplaceCacheComponent } from \"./marketplace/marketplace-cache/marketplace-cache.component\";\r\nimport { MarketplaceAddComponent } from \"./marketplace/marketplace-add/marketplace-add.component\";\r\nimport { PosComponent } from \"./pos/pos.component\";\r\nimport { EditComponent } from \"./pos/edit/edit.component\";\r\n\r\nconst routes: Routes = [\r\n {\r\n path: \"\",\r\n component: ChannelsComponent,\r\n children: [\r\n {\r\n path: \"\",\r\n redirectTo: \"marketplace\",\r\n pathMatch: \"full\",\r\n },\r\n {\r\n path: \"marketplace\",\r\n component: MarketplaceComponent,\r\n canActivate: [AuthGuard],\r\n data: { title: \"List\" },\r\n },\r\n {\r\n path: \"marketplace/form\",\r\n component: MarketplaceFormComponent,\r\n canActivate: [AuthGuard],\r\n data: { title: \"Add new Channel\" },\r\n },\r\n {\r\n path: \"marketplace/view\",\r\n component: MarketplaceViewComponent,\r\n canActivate: [AuthGuard],\r\n data: { title: \"Marketplace View\" },\r\n },\r\n {\r\n path: \"marketplace/cache\",\r\n component: MarketplaceCacheComponent,\r\n canActivate: [AuthGuard],\r\n data: { title: \"Marketplace Cache\" },\r\n },\r\n {\r\n path: \"marketplace/add\",\r\n component: MarketplaceAddComponent,\r\n canActivate: [AuthGuard],\r\n data: { title: \"Marketplace Add\" },\r\n },\r\n {\r\n path: \"pos\",\r\n component: PosComponent,\r\n canActivate: [AuthGuard],\r\n data: { title: \"POS\" },\r\n },\r\n {\r\n path: \"pos/edit\",\r\n component: EditComponent,\r\n canActivate: [AuthGuard],\r\n data: { title: \"POS Edit\" },\r\n },\r\n ],\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n RouterModule.forChild(routes)\r\n ],\r\n})\r\nexport class ChannelsRoutingModule {}\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-channels',\r\n templateUrl: './channels.component.html',\r\n styleUrls: ['./channels.component.scss']\r\n})\r\nexport class ChannelsComponent implements OnInit {\r\n \r\n channelTabs : any = [\r\n { Title : 'Marketplace' , Url : '/menu/channel/marketplace' },\r\n { Title : 'POS' , Url : '/menu/channel/pos' }\r\n ];\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n \r\n}\r\n","<nav class=\"navbar page-nav navbar-default py-0 navbar-expand-lg\">\r\n <div class=\"container-fluid \">\r\n <div>\r\n <!-- add nav-tab here -->\r\n <nav-tab [Tabs]=\"channelTabs\"></nav-tab>\r\n </div>\r\n </div>\r\n</nav>\r\n<router-outlet></router-outlet>\r\n\r\n\r\n\r\n","import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { NavTabModule } from '../nav-tab/nav-tab.component';\r\nimport { MainPanelModule } from '../main-panel/main-panel.component';\r\nimport { ChannelsComponent } from './channels.component';\r\nimport { MarketplaceComponent } from './marketplace/marketplace.component';\r\nimport { MarketplaceFormComponent } from './marketplace/marketplace-form/marketplace-form.component';\r\nimport { MarketplaceViewComponent } from './marketplace/marketplace-view/marketplace-view.component';\r\nimport { MarketplaceCacheComponent } from './marketplace/marketplace-cache/marketplace-cache.component';\r\nimport { MarketplaceAddComponent } from './marketplace/marketplace-add/marketplace-add.component';\r\nimport { PosComponent } from './pos/pos.component';\r\nimport { EditComponent } from './pos/edit/edit.component';\r\nimport { MatRadioModule } from '@angular/material/radio';\r\nimport { NgSelectModule } from '@ng-select/ng-select';\r\nimport { ChannelsRoutingModule } from './channels-routing.module';\r\nimport { RouterModule } from '@angular/router';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { MatChipsModule } from '@angular/material/chips';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n NavTabModule,\r\n MainPanelModule,\r\n MatRadioModule,\r\n NgSelectModule,\r\n ChannelsRoutingModule,\r\n RouterModule,\r\n DragDropModule,\r\n MatChipsModule,\r\n MatInputModule,\r\n MatButtonModule,\r\n MatIconModule,\r\n MatTooltipModule\r\n ],\r\n declarations: [\r\n ChannelsComponent,\r\n MarketplaceComponent,\r\n MarketplaceFormComponent,\r\n MarketplaceViewComponent,\r\n MarketplaceCacheComponent,\r\n MarketplaceAddComponent,\r\n PosComponent,\r\n EditComponent\r\n ],\r\n schemas: [NO_ERRORS_SCHEMA]\r\n})\r\nexport class ChannelsModule { }\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { HttpService } from '../../../../services/http.service';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { ContactSupportComponent } from './contact-support/contact-support.component';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { ModalDialogTokopediaComponent } from '../modal-dialog-tokopedia/modal-dialog-tokopedia';\r\nimport { ModalDialogWoocommerceComponent } from '../modal-dialog-woocommerce/modal-dialog-woocommerce.component';\r\nimport { Channel } from 'src/app/model/Channel';\r\n\r\n\r\n@Component({\r\n selector: 'app-marketplace-add',\r\n templateUrl: './marketplace-add.component.html',\r\n styleUrls: ['./marketplace-add.component.scss']\r\n})\r\nexport class MarketplaceAddComponent implements OnInit {\r\n\r\n constructor(private route: ActivatedRoute, private http: HttpService, private service: Router, public dialog: MatDialog, public toastr: ToastrService) { }\r\n ShopID: number;\r\n pageData: any;\r\n ShopIDString: string;\r\n public NewFeatureVisible = false;\r\n ngOnInit(): void {\r\n this.route.queryParams.subscribe(params => {\r\n })\r\n }\r\n\r\n saveTokopedia() {\r\n let form = {\r\n ShopID: Number(this.ShopID)\r\n }\r\n this.http.post<any>('/api/ChannelAdd/Tokopedia', form).subscribe(result => {\r\n this.service.navigate([\"/menu/channel\"]);\r\n })\r\n }\r\n\r\n saveWooCommerce(item: Channel) {\r\n this.http.post<any>('/api/ChannelAdd/AddWooCommerce', item).subscribe(result => {\r\n this.service.navigate([\"/menu/channel\"]);\r\n })\r\n }\r\n\r\n saveKalCare() {\r\n let form = {\r\n ShopIDString: this.ShopIDString\r\n }\r\n this.http.post<any>('/api/ChannelAdd/AddKalCare', form).subscribe(result => {\r\n this.service.navigate([\"/menu/channel\"]);\r\n })\r\n }\r\n\r\n shopeeAuthorize() {\r\n this.http.post<any>('/api/ChannelAuthorization/ShopeeV2_URL').subscribe(result => {\r\n window.location.href = result.Url;\r\n });\r\n }\r\n\r\n tiktokAuthorize()\r\n {\r\n this.http.post<any>('/api/ChannelAuthorization/Tiktok_URL').subscribe(result => {\r\n window.location.href = result.Url;\r\n });\r\n }\r\n\r\n openTokopediaDialog() {\r\n const dialogRef = this.dialog.open(ModalDialogTokopediaComponent, {\r\n data: {\r\n title: 'Tokopedia',\r\n ShopID: this.ShopID\r\n },\r\n width: '30%'\r\n });\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result != null) {\r\n this.ShopID = result.ShopID;\r\n this.saveTokopedia();\r\n }\r\n });\r\n }\r\n\r\n openKalcareDialog() {\r\n const dialogRef = this.dialog.open(ModalDialogTokopediaComponent, {\r\n data: {\r\n title: 'KAL Care',\r\n ShopID: this.ShopIDString\r\n },\r\n width: '30%'\r\n });\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result != null) {\r\n this.ShopIDString = result.ShopID;\r\n this.saveKalCare();\r\n }\r\n });\r\n }\r\n\r\n openWooCommerceDialog() {\r\n const dialogRef = this.dialog.open(ModalDialogWoocommerceComponent, {\r\n data: {\r\n ShopID: this.ShopID\r\n },\r\n width: '30%'\r\n })\r\n dialogRef.afterClosed().subscribe((result: Channel) => {\r\n if (result.URL != null && result.ConsumerSecret != null && result.ConsumerKey != null) {\r\n this.saveWooCommerce(result);\r\n }\r\n });\r\n }\r\n\r\n \r\n\r\n\r\n contactSupport() {\r\n const support = this.dialog.open(ContactSupportComponent, {\r\n width: '30%'\r\n });\r\n support.afterClosed().subscribe(res => {\r\n if (res != null) {\r\n if (res.Email == null) {\r\n this.toastr.error('Email cannot be empty!', 'Error!');\r\n return;\r\n };\r\n if (res.URL == null) {\r\n this.toastr.error('Email cannot be empty!', 'URL!');\r\n return;\r\n };\r\n\r\n var params = {\r\n URL: res.URL,\r\n Email: res.Email\r\n }\r\n this.http.post<any>('Api/ChannelAuthorization/Tokopedia_Intercom', params)\r\n .subscribe({\r\n next: () => {\r\n this.toastr.success('Your request has been received, we will be in touch at ' + res.Email, 'Thank you!');\r\n },\r\n error: (err) => {\r\n console.log('Failed to submit customer support!', err);\r\n }\r\n })\r\n }\r\n })\r\n }\r\n onToggleNewVersion(toggleState: boolean) {\r\n this.NewFeatureVisible = toggleState;\r\n }\r\n}\r\n","<mainpanel [Title]=\"'Add New Channel'\" [pageData]=\"pageData\" [hideSearchBox]=\"true\" [hideSearchDropdown]=\"true\">\r\n <actions>\r\n <a role=\"button\" class=\"btn btn-secondary btn-fill btn-lg me-3\" routerLink=\"/menu/channel\">Cancel</a>\r\n </actions>\r\n <content>\r\n <div class=\"container\">\r\n <div class=\"row mt-12\">\r\n <div class=\"col-md-4 ps-md-0\">\r\n <div class=\"card h-100 ribbon-box\">\r\n \r\n <div class=\"card-header\">\r\n <img class=\"w-100\"\r\n src=\"https://res.cloudinary.com/pos/image/upload/v1605249851/icons/Marketplace%20logo/shopee-logo.png\" />\r\n </div>\r\n <div class=\"card-body\">\r\n <div class=\"mt-4 mb-4 h-auto\" style=\"font-size: larger;\">\r\n <p>Authorize DEALPOS versi V2 to manage your shopee, you will be redirected to shopee\r\n website to complete this process.</p>\r\n <p>You will need to sign in to Shopee using your Seller account and confirm the\r\n authorization.</p>\r\n </div>\r\n <a class=\"h4 btn-bottom fw-bold btn btn-shopee text-white btn-md btn-block\"\r\n (click)=\"shopeeAuthorize()\">Authorize Account</a>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4 pe-md-0\">\r\n <div class=\"card h-100\">\r\n <div class=\"card-header\">\r\n <img class=\"w-100\"\r\n src=\"https://res.cloudinary.com/pos/image/upload/v1605249861/icons/Marketplace%20logo/download_tkpd.png\" />\r\n </div>\r\n <div class=\"card-body\">\r\n <div class=\"mt-4 mb-4 h-auto\" style=\"font-size: larger;\">\r\n <p>Authorize DEALPOS to manage your tokopedia, please <a type=\"button\"\r\n (click)=\"contactSupport()\" class=\"button text-primary fw-bold\">contact\r\n our customer support</a> to complete this process.</p>\r\n <p>Our team will send an invitation email which needs to be approved.</p>\r\n </div>\r\n <button (click)=\"openTokopediaDialog()\" data-cy=\"submitChannelTokopedia\"\r\n class=\"h4 btn-bottom fw-bold btn btn-success text-white btn-md btn-block\">Submit\r\n Shop ID</button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4 pe-md-0\">\r\n <div class=\"card h-100\">\r\n <div class=\"card-header\">\r\n <img class=\"w-100\"\r\n src=\"https://woocommerce.com/wp-content/themes/woo/images/logo-woocommerce.svg\" />\r\n </div>\r\n <div class=\"card-body\">\r\n <div class=\"mt-4 mb-4 h-auto\" style=\"font-size: larger;\">\r\n <p>Authorize DEALPOS to manage your Personal Website</p>\r\n <p>Configure woocommerce integration by visiting <a\r\n class=\"button text-primary fw-bold\"\r\n href=\"https://support.dealpos.com/en/articles/5733019-woocommerce-authorization-at-dealpos-apps\">this\r\n article</a></p>\r\n </div>\r\n <button (click)=\"openWooCommerceDialog()\"\r\n class=\"h4 btn-bottom fw-bold btn btn-woocommerce text-white btn-md btn-block\">Register</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mt-12\">\r\n <div class=\"col-md-4 ps-md-0\">\r\n <div class=\"card h-100\"> \r\n <div class=\"card-header\">\r\n <img class=\"w-100 \"\r\n src=\"https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png\" />\r\n </div>\r\n <div class=\"card-body\">\r\n <div class=\"mt-4 mb-4 h-auto\" style=\"font-size: larger;\">\r\n <p>Authorize DEALPOS to manage your Tiktok Seller, you will be redirected to Tiktok\r\n website to complete this process.</p>\r\n <p>You will need to sign in to Tiktok using your Seller account and confirm the\r\n authorization.</p>\r\n </div>\r\n <a class=\"h4 btn-bottom fw-bold btn btn-tiktok text-white btn-md btn-block\"\r\n (click)=\"tiktokAuthorize()\">Authorize Account</a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"NewFeatureVisible\" class=\"row mt-12\">\r\n <div class=\"col-md-4 ps-md-0\">\r\n <div class=\"card h-100 ribbon-box\">\r\n <div class=\"ribbon ribbon-top-right\">\r\n <span>BETA</span>\r\n </div>\r\n <div class=\"card-header\">\r\n <img class=\"w-100\"\r\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAB/CAMAAADLlgV7AAABIFBMVEX///8jHyCAvAAAZUgAAACdyUTD3YwAYEEAY0V6uQAAXT0AWzoAWDUVDxCAfn94uAC7urulpKUMAAQZFBUPBwnf6+ecu7Cjw7jf39/3+vmZmZnn8e4pdl5om4oGblIZblOpvrZNi3draWnc7LxOS0w7gmy/19AAYEhaj3zK3NbW5N+Twk272Immy32Ih4cydFwrdlGgzFE+hEZvnY30+em+2Z4ATiW4ycLI4ZzD27Pu9t2izUTn8tJ9qJrv7+8/PD3U09NZV1gtKSqPxCTP5ar3+vDCwcG42X+kzl3R48TW6bWw1HLk7uLE35aRunidvrMxe00ufDoBakBjYWF/sISWvKdsp0Glz1et0nVvqFFWlzQAUTV8rmlbmUeLr6IARhVkELW6AAAVU0lEQVR4nO1dj3/aOJYnONTGdkqbBKgLhFIKDTTT2QxsyCaQpCFp2GTa7O7cXTs3N8z//1+cnmRLT7L8C5rZ9M7f3c802PKz/L7S+yUZCoUcOXLk+C7RGPUkLP/dHfp/DK9tWxLcVvqLL14GeB46d/b8JcKz1IK8NPd9HuBF+s5+B5i4hgI3jTooLja3d31svlfOnW1s7gpsb8Zq7Zlou3l+lnjfZ5vbPjbj5X5vqNshMqppr322uRFg54N8yjvf2UDYfhonx8Ntt1Vaw3i6xVtvJ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ToMR1ZUR2TMQkooNGhIaLSbEhmsO+1Z0wwqB2uQUai5cD9yves7yQZdx7FMEzjvZCPDa1Fppm0yu+JBKGnZtrMHk0AhgzwHvVM7iQzCMVsVoubTa9pcJhuLEhmFoQ3noQtSWYV6dhrU89rXjD86O4LIqFpMCVbT4tHDiM5kNqYEGVSKRaWwwZyRjJ7rukc8ch804Wcc3D1eFx3skQNue1A7cl32sPA5RAY5e8TIIH+5wU0nTfajEC6rthB24Ich6hPS5g9Kxh+k8Z7f+N6CszRv3Sd/0T61yfk/1ByvOtpzoSlt0YC2rjVZEpkW75/wE42RQ/vgHmFr1acSHNccCeF99uhtnzTPIvdmyXBhYFChQglU7XCMlgdsWL5t4Ed2m75Gq/QckEH+dROXKaoAlMM1+vW69PgD+tmDZrST8OMOoRyYC6HtRNwC0uq8ZF5okA+ekFUYEgivMiSSq8Ef9CK1c1zOoN8feEKm2j+pYDKALgwUKd4guBlShfToVdw3RQlcAps5+DCVIhoF5xS95MiRI8ejxf8CaCHBz1xZMMgAAAAASUVORK5CYII=\" />\r\n </div>\r\n <div class=\"card-body\">\r\n <div class=\"mt-4 mb-4 h-auto\" style=\"font-size: larger;\">\r\n <p>Authorize DEALPOS to manage your KALCare Shop. You will need to fill your KALCare\r\n ShopID.</p>\r\n <p>Please request your shopID by <a class=\"button text-primary fw-bold\"\r\n href=\"https://www.kalcare.com/kania\">contacting</a> the KALCare team</p>\r\n </div>\r\n <button (click)=\"openKalcareDialog()\"\r\n class=\"h4 btn-bottom fw-bold btn btn-kalcare text-white btn-md btn-block\">Submit\r\n Shop ID</button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4 pe-md-0\">\r\n \r\n </div>\r\n \r\n </div>\r\n </div>\r\n <div class=\"p-5 text-start\">\r\n <mat-slide-toggle (change)=\"onToggleNewVersion($event.checked)\">Show Beta Channel Integration\r\n </mat-slide-toggle>\r\n </div>\r\n </content>\r\n</mainpanel>","import { Component, OnInit } from '@angular/core';\r\nimport { HttpService } from '../../../../services/http.service';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { ToastrService } from 'ngx-toastr';\r\n@Component({\r\n selector: 'app-marketplace-cache',\r\n templateUrl: './marketplace-cache.component.html',\r\n styleUrls: ['./marketplace-cache.component.scss']\r\n})\r\nexport class MarketplaceCacheComponent implements OnInit {\r\n pageData: any;\r\n data: any;\r\n ID: string;\r\n role :any;\r\n Name :string = 'Total Product in Channel';\r\n advance : boolean = false;\r\n constructor(private route: ActivatedRoute, private http: HttpService, private router: Router, private toastr: ToastrService) {\r\n this.advance = false;\r\n this.route.queryParams.subscribe(params => {\r\n this.ID = params['ID'];\r\n });\r\n if (this.ID != null) {\r\n this.Load();\r\n }\r\n\r\n\r\n }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n Load(): void {\r\n var req = {\r\n ID: this.ID\r\n }\r\n this.http.post<any>('/api/ChannelLoader/GetTotalProduct', req).subscribe(result => {\r\n this.data = result.Model;\r\n this.Name = this.data.Name;\r\n },(err)=>{\r\n alert(err.error.Message); \r\n })\r\n }\r\n\r\n clear(): void {\r\n let result = confirm(\"Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace\");\r\n if (result) {\r\n var req = {\r\n ID: this.ID\r\n }\r\n this.http.post<any>('/api/Channel/ClearCacheChannel', req).subscribe(result => {\r\n this.toastr.success('Successfully cleared cache', \"Success\", {\r\n closeButton: true,\r\n positionClass: \"toast-bottom-right\"\r\n });\r\n this.Load();\r\n })\r\n }\r\n\r\n }\r\n\r\n\r\n\r\n delete(model: any): void {\r\n let result = confirm(\"Delete channel \" + model.Name + \" ?\");\r\n if (result) {\r\n //Logic to delete the item\r\n var data = {\r\n ID : model.ID\r\n }\r\n this.http.post<any>('/api/Channel/DeleteChannel', data).subscribe(result => {\r\n this.toastr.success('Channel ' + model.Name + ' is deleted!', \"Success\", {\r\n closeButton: true,\r\n positionClass: \"toast-bottom-right\"\r\n });\r\n this.router.navigate(['menu/channel']);\r\n })\r\n }\r\n\r\n }\r\n\r\n\r\n\r\n}\r\n\r\n","<mainpanel [Title]=\"Name\" [pageData]=\"pageData\" [hideSearchBox]=\"true\"\r\n [hideSearchDropdown]=\"true\">\r\n <actions>\r\n <a role=\"button\" class=\"btn btn-danger btn-lg text-white me-2\" \r\n (click)=\"clear()\"> Clear</a>\r\n\r\n <a [routerLink]=\"['/menu/channel/marketplace/view']\" role=\"button\" class=\"btn btn-success text-white btn-lg ms-2\" \r\n [queryParams]=\"{ID: ID}\">\r\n Back \r\n </a>\r\n\r\n </actions>\r\n <content>\r\n <div class=\"container-fluid py-5 bg-light-gray\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-6\">\r\n <div class=\"card\" *ngIf=\"data\">\r\n <div class=\"card-header\">\r\n <h3>Total Product</h3>\r\n </div>\r\n <div class=\"card-body\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-12 mt-3\">\r\n <div class=\"info-label-group\">\r\n <label>Last Sync</label>\r\n <div data-toggle=\"title\"\r\n matTooltip=\"Your shop name in marketplace channel\">\r\n <span>{{data.LastSync | date: 'dd MMM yyyy HH:mm' }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-6\" data-toggle=\"tooltip\"\r\n matTooltip=\"total product in channel\">\r\n <div class=\"info-label-group\">\r\n <label>Product in Channel</label>\r\n <div>\r\n <span>{{data.ProductInChannel | number}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-6\" data-toggle=\"tooltip\"\r\n matTooltip=\"total product in marketplace live\">\r\n <div class=\"info-label-group\">\r\n <label>Product in {{data.Type}}</label>\r\n <div>\r\n <span>{{data.TotalProductMarketplaceLive | number}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-sm-12\">\r\n <div class=\"info-label-group\">\r\n <label>Product Not in POS</label>\r\n <div data-toggle=\"title\" matTooltip=\"total product not in pos\">\r\n <span>{{data.ProductNotInPOS | number }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-12\">\r\n <div class=\"info-label-group\">\r\n <label>Product Not in Channel</label>\r\n <div data-toggle=\"title\" matTooltip=\"total product not in channel\">\r\n <span>{{data.ProductNotInChannel | number}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-12\">\r\n <div class=\"info-label-group\">\r\n <label>Duplicate SKU</label>\r\n <div data-toggle=\"title\" matTooltip=\"total duplicate code/sku\">\r\n <span>{{data.DuplicateSKU | number}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n\r\n </content>\r\n</mainpanel>","import { Component, OnInit, ViewEncapsulation } from \"@angular/core\";\r\nimport { MatChipInputEvent } from \"@angular/material/chips\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { ToastrService } from \"ngx-toastr\";\r\nimport { Channel, POS } from \"../../../../model/Channel\";\r\nimport { HttpService } from \"../../../../services/http.service\";\r\n\r\n@Component({\r\n selector: \"app-marketplace-form\",\r\n templateUrl: \"./marketplace-form.component.html\",\r\n styleUrls: [\"./marketplace-form.component.scss\"],\r\n})\r\nexport class MarketplaceFormComponent implements OnInit {\r\n model: Channel = new Channel();\r\n form: POS = new POS();\r\n TypeMarket: any;\r\n loading: boolean = false;\r\n ListCategory: any = [];\r\n ListSalesType: any;\r\n ListOutlet: any;\r\n ListTax: any;\r\n ListPaymentMethod: any;\r\n List: Channel[];\r\n ListWriteOff: any = [];\r\n Modes: any;\r\n pageData: any;\r\n advance: boolean = false;\r\n\r\n additionalItems: string[] = [];\r\n\r\n constructor(\r\n route: ActivatedRoute,\r\n private http: HttpService,\r\n private service: Router,\r\n private Toastr: ToastrService\r\n ) {\r\n this.advance = false;\r\n let param = route.snapshot.params;\r\n if (param != null) {\r\n if (param.ID != undefined) {\r\n this.model.ID = param.ID;\r\n } else {\r\n this.model.ID = \"00000000-0000-0000-0000-000000000000\";\r\n }\r\n }\r\n\r\n this.TypeMarket = [\r\n { Name: \"Shopee\", ID: 0 },\r\n { Name: \"Tokopedia\", ID: 1 },\r\n { Name: \"WooCommerce\", ID: 2 },\r\n { Name: \"KalCare\", ID: 4 },\r\n { Name: \"ShopeeV2\", ID: 5 },\r\n { Name: \"Tiktok\", ID: 6 },\r\n ];\r\n }\r\n\r\n ngOnInit(): void {\r\n this.loaderChannel(this.model.ID);\r\n }\r\n\r\n \r\n private loaderChannel(ID: any): void {\r\n this.http\r\n .post<any>(\"/api/ChannelLoader/GetPOSProperties\", { ID: ID })\r\n .subscribe((result) => {\r\n this.model = result.Model;\r\n this.form = result.Form;\r\n this.ListSalesType = result.Options.ListSalesOrderType;\r\n this.ListOutlet = result.Options.ListOutlet;\r\n this.ListTax = result.Options.ListTax;\r\n this.ListPaymentMethod = result.Options.ListPaymentMethod;\r\n this.Modes = result.Options.Modes;\r\n this.ListWriteOff = result.Options.ListWriteOff;\r\n this.initAdditionalItems();\r\n });\r\n }\r\n\r\n private initAdditionalItems() {\r\n let addtionalItems = this.model.Additionalitem;\r\n if (addtionalItems) {\r\n this.additionalItems = addtionalItems.split(',');\r\n }\r\n }\r\n\r\n public Submit(): void {\r\n if (this.model.ProductCategoryDefault == null) {\r\n this.model.ProductCategoryDefault = 0;\r\n }\r\n\r\n if (this.model.POSInventoryOutletArray != null) {\r\n if (this.model.POSInventoryOutletArray.length > 0) {\r\n this.model.POSInventoryOutlet =\r\n this.model.POSInventoryOutletArray.join(\",\");\r\n } else {\r\n this.model.POSInventoryOutlet = null;\r\n }\r\n } else {\r\n this.model.POSInventoryOutlet = null;\r\n }\r\n // set additional item for submit\r\n this.model.Additionalitem = this.additionalItems.join(',');\r\n\r\n this.http\r\n .post<any>(\"/api/Channel/SubmitChannel\", this.model)\r\n .subscribe((result) => {\r\n this.Toastr.success(\"Successfully submitted the Channel\", \"Success!\");\r\n this.service.navigate([\"/menu/channel\"]);\r\n });\r\n }\r\n\r\n SubmitHost(): void {\r\n this.http\r\n .post(\"/api/Channel/SubmitConfig\", this.form)\r\n .subscribe((result) => {\r\n this.Toastr.success(\"Successfully submitted the Channel\", \"Success!\");\r\n this.service.navigate([\"/menu/channel\"]);\r\n });\r\n }\r\n\r\n\r\n Channel(): void {\r\n this.http.post<any>(\"/api/Channel/GetChannel\", {}).subscribe((result) => {\r\n this.List = result.Data;\r\n });\r\n }\r\n\r\n changeOutlet(): void {\r\n if (this.Constants.IsEmpty(this.model.POSOutlet)) {\r\n this.model.SyncOrder = false;\r\n } else {\r\n this.model.SyncOrder = true;\r\n }\r\n }\r\n\r\n Cancel(): void {\r\n this.Channel();\r\n }\r\n\r\n Constants = {\r\n GuidEmpty: \"00000000-0000-0000-0000-000000000000\",\r\n IsEmpty(input): boolean {\r\n return input == null || input == undefined || input == this.GuidEmpty;\r\n },\r\n };\r\n\r\n LoadCategory(): void {\r\n if (this.model.TypeID == 0 || this.model.TypeID == 1) {\r\n let param = {\r\n TypeID: this.model.TypeID,\r\n };\r\n this.http\r\n .post<any>(\"/api/Channel/GetChannelCategory\", param)\r\n .subscribe((result) => {\r\n this.ListCategory = result;\r\n });\r\n }\r\n }\r\n\r\n public addAdditonalItem(event: MatChipInputEvent) {\r\n const value = (event.value || \"\").trim();\r\n if (!this.additionalItems.includes(value)) {\r\n this.additionalItems.push(value);\r\n }\r\n\r\n // Clear the input value\r\n event.chipInput!.clear();\r\n }\r\n\r\n public removeAdditonalItem(fruit: string): void {\r\n const index = this.additionalItems.indexOf(fruit);\r\n if (index >= 0) {\r\n this.additionalItems.splice(index, 1);\r\n }\r\n }\r\n}\r\n","<mainpanel [Title]=\"'Configure Channel'\" [pageData]=\"pageData\" [hideSearchBox]=\"true\" [hideSearchDropdown]=\"true\">\r\n <actions>\r\n <a role=\"button\" class=\"btn btn-secondary btn-fill btn-lg me-3\" routerLink=\"/menu/channel\">Cancel</a>\r\n <a role=\"button\" class=\"btn btn-success btn-fill btn-lg text-white\" (click)=\"Submit()\" data-toggle=\"tooltip\"\r\n data-placement=\"top\" matTooltip=\"Choose Outlet where transaction is recorded\">Submit</a>\r\n\r\n\r\n </actions>\r\n <content>\r\n <div class=\"container-fluid py-5 bg-light-gray\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-8\">\r\n <form #f=\"ngForm\" name=\"form\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-12\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <h3>Marketplace Setup</h3>\r\n </div>\r\n <div class=\"card-body mt-8\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-6\">\r\n <div class=\"form-label-group\">\r\n <input type=\"text\" id=\"Name\" placeholder=\"Name\"\r\n class=\"form-control tall\" [(ngModel)]=\"model.Name\" name=\"Name\"\r\n matTooltip=\"Channel Name\" #name=\"ngModel\" required />\r\n <label for=\"Name\">Name</label>\r\n </div>\r\n <!-- angular validation : https://angular.io/guide/form-validation -->\r\n <div class=\"alert alert-danger\"\r\n *ngIf=\"name.invalid && (name.dirty || name.touched)\">\r\n <span>Channel name is required!</span>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-6 me-0\">\r\n <div class=\"form-label-group\"\r\n [ngClass]=\"{'empty' : Constants.IsEmpty(model.TypeID)}\">\r\n <ng-select class=\"center-text tall\" [items]=\"TypeMarket\" id=\"Type\"\r\n bindLabel=\"Name\" bindValue=\"ID\" placeholder=\"Type\"\r\n [(ngModel)]=\"model.TypeID\" name=\"Market\"\r\n (change)=\"LoadCategory()\" matTooltip=\"Channel type\"\r\n data-toggle=\"tooltip\">\r\n </ng-select>\r\n <label for=\"type\">Type</label>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-sm-6\">\r\n <div class=\"form-label-group\" *ngIf=\"model.TypeID != 2 \">\r\n <input type=\"number\" id=\"ShopID\" placeholder=\"Shop ID\"\r\n class=\"form-control\" [(ngModel)]=\"model.ShopID\" name=\"ShopID\"\r\n data-toggle=\"tooltip\" matTooltip=\"Fill with your Shop ID\"\r\n *ngIf=\"model.ShopIDString == null || model.ShopIDString == ''\" />\r\n\r\n <input type=\"text\" id=\"ShopIDString\" placeholder=\"Shop ID String\"\r\n class=\"form-control\" [(ngModel)]=\"model.ShopIDString\"\r\n name=\"ShopIDString\" data-toggle=\"tooltip\"\r\n matTooltip=\"Fill with your Shop ID String\"\r\n *ngIf=\"model.ShopIDString\" />\r\n <label for=\"ShopID\">Shop ID</label>\r\n </div>\r\n </div>\r\n\r\n <!--<div class=\"col-sm-12 me-0\">\r\n <div class=\"form-label-group\"\r\n [ngClass]=\"{'empty' : Constants.IsEmpty(model.ProductCategoryDefault)}\">\r\n <ng-select class=\"center-text tall\" [items]=\"ListCategory\" bindLabel=\"Value\" bindValue=\"Key\"\r\n placeholder=\"Market Place Category\" [(ngModel)]=\"model.ProductCategoryDefault\" name=\"Category\">\r\n </ng-select>\r\n <label>\r\n Category\r\n </label>\r\n </div>\r\n </div>-->\r\n\r\n <div class=\"col-sm-6\">\r\n <div class=\"form-label-group\">\r\n <input type=\"text\" id=\"URL\" placeholder=\"URL\" class=\"form-control\"\r\n [(ngModel)]=\"model.URL\" name=\"URL\" data-toggle=\"tooltip\"\r\n matTooltip=\"Fill with your Marketplace URL\" #url=\"ngModel\"\r\n pattern=\"^((https?|ftp|smtp):\\/\\/)?(www.)?[a-z0-9]+(.[a-z]+)(.id)?(\\/[-~$_.+!*'(),a-zA-Z0-9#]+\\/?)+$\" />\r\n <label for=\"URL\">Marketplace URL</label>\r\n </div>\r\n <div class=\"alert alert-danger\"\r\n *ngIf=\"url.invalid && (url.dirty || url.touched)\">\r\n <span *ngIf=\"url.errors.pattern\">Please enter a valid URL!</span>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-6\" *ngIf=\"model.TypeID == 2\">\r\n <div class=\"form-label-group\">\r\n <input type=\"text\" id=\"ConsumerKey\" placeholder=\"Consumer Key\"\r\n class=\"form-control\" [(ngModel)]=\"model.ConsumerKey\"\r\n name=\"ConsumerKey\" data-toggle=\"tooltip\"\r\n matTooltip=\"Fill with your Marketplace Consumer Key\"\r\n #ConsumerKey=\"ngModel\" />\r\n <label for=\"URL\">Consumer Key</label>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-6\" *ngIf=\"model.TypeID == 2\">\r\n <div class=\"form-label-group\">\r\n <input type=\"text\" id=\"ConsumerSecret\" placeholder=\"Consumer Secret\"\r\n class=\"form-control\" [(ngModel)]=\"model.ConsumerSecret\"\r\n name=\"ConsumerSecret\" data-toggle=\"tooltip\"\r\n matTooltip=\"Fill with your Marketplace Consumer Secret\"\r\n #ConsumerSecret=\"ngModel\" />\r\n <label for=\"URL\">Consumer Secret</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-sm-6\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <h3>Sync</h3>\r\n </div>\r\n <div class=\"card-body mt-8\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-12\">\r\n <div class=\"form-label-group radio\">\r\n <label for=\"SyncOrder\">Sync Order</label>\r\n <div class=\"mt-3\">\r\n <mat-radio-group [(ngModel)]=\"model.SyncOrder\" name=\"SyncOrder\">\r\n <mat-radio-button [value]=\"false\" class=\"me-5\"\r\n data-toggle=\"tooltip\"\r\n matTooltip=\"No Include if the channel makes a transaction\">\r\n No\r\n </mat-radio-button>\r\n <mat-radio-button [value]=\"true\" class=\"me-5\"\r\n data-toggle=\"tootip\"\r\n matTooltip=\"Include if the channel makes a transaction\">\r\n Yes\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-sm-12\">\r\n <div class=\"form-label-group radio\">\r\n <label for=\"SyncOrder\">Sync Inventory</label>\r\n <div class=\"mt-3\">\r\n <mat-radio-group [(ngModel)]=\"model.SyncInventory\"\r\n name=\"SyncInventory\">\r\n <mat-radio-button [value]=\"false\" class=\"me-5\"\r\n data-toggle=\"tooltip\"\r\n matTooltip=\"No Include if the channel makes a transaction\">\r\n No\r\n </mat-radio-button>\r\n <mat-radio-button [value]=\"true\" class=\"me-5\"\r\n data-toggle=\"tootip\"\r\n matTooltip=\"Include if the channel makes a transaction\">\r\n Yes\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-sm-6\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <h3>Log</h3>\r\n </div>\r\n <div class=\"card-body mt-8\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div class=\"form-label-group radio\"\r\n [ngClass]=\"{'empty' : Constants.IsEmpty(model.InventoryLog)}\">\r\n <label style=\"top: -11px;background: white;\">Inventory Log\r\n Mode</label>\r\n <div class=\"mt-3\">\r\n <mat-radio-group [(ngModel)]=\"model.InventoryLog\"\r\n name=\"InventoryLog\">\r\n <mat-radio-button [value]=\"1\" class=\"me-5\"\r\n data-toggle=\"tooltip\"\r\n matTooltip=\"Not record any log from transaction\">\r\n None\r\n </mat-radio-button>\r\n <mat-radio-button [value]=\"2\" class=\"me-5\"\r\n data-toggle=\"tooltip\"\r\n matTooltip=\"Only record error log from transaction\">\r\n Error\r\n </mat-radio-button>\r\n <mat-radio-button [value]=\"3\" class=\"me-5\"\r\n data-toggle=\"tooltip\"\r\n matTooltip=\"Record all log from transaction\">\r\n Full\r\n </mat-radio-button>\r\n\r\n </mat-radio-group>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6\">\r\n <div class=\"card\">\r\n <div class=\"card-header cursor mb-3\" >\r\n <h3>Advance</h3>\r\n </div>\r\n <div class=\"card-body mt-8\" >\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div class=\"form-label-group\">\r\n <input type=\"text\" id=\"Register\" placeholder=\"Register\"\r\n class=\"form-control\" [(ngModel)]=\"model.Register\"\r\n name=\"Register\" data-toggle=\"tooltip\"\r\n matTooltip=\"Outlet register name\" />\r\n <label for=\"Register\">Register</label>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-12\">\r\n <div class=\"form-label-group\">\r\n <input type=\"email\" name=\"Email\" class=\"form-control\"\r\n [ngClass]=\"{'is-invalid border border-danger': Email.invalid}\"\r\n #Email=\"ngModel\" [ngModelOptions]=\"{updateOn: 'blur'}\"\r\n placeholder=\"Email\" [(ngModel)]=\"model.CustomerDefaultEmail\"\r\n email pattern=\"\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b\" />\r\n <label for=\"Name\">Customer Default Email</label>\r\n </div>\r\n <div class=\"text-danger\"\r\n *ngIf=\"Email.invalid && (Email.dirty || Email.touched)\">\r\n <p *ngIf=\"Email.errors.pattern\">\r\n Email is not valid\r\n </p>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-12\">\r\n <div class=\"form-label-group\">\r\n <input type=\"number\" name=\"MinimumInventory\" class=\"form-control\"\r\n placeholder=\"Minimum Inventory\" id=\"MinimumInventory\"\r\n [(ngModel)]=\"model.MinimumInventory\" data-toggle=\"tooltip\"\r\n matTooltip=\"Minimal inventory on channel, if product inventory is bellow minimum inventory will automatically update to 0 \" />\r\n <label for=\"MinimumInventory\">Minimum Inventory</label>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-12 mat-chip-custom\">\r\n <mat-form-field class=\"w-100\" appearance=\"outline\">\r\n <mat-label>Additional Item</mat-label>\r\n <mat-chip-list #chipList aria-label=\"Additional Item\">\r\n <mat-chip *ngFor=\"let item of additionalItems\" \r\n style=\"font-size: 12px;\"\r\n (removed)=\"removeAdditonalItem(item)\">\r\n {{item}}\r\n <button matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip>\r\n <input placeholder=\"New Item\"\r\n [matChipInputFor]=\"chipList\"\r\n (matChipInputTokenEnd)=\"addAdditonalItem($event)\"\r\n [matChipInputFor]=\"chipList\">\r\n </mat-chip-list>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12\">\r\n <div class=\"form-label-group\">\r\n <input type=\"number\" name=\"Index\" class=\"form-control\"\r\n placeholder=\"Additional item\" id=\"Additionalitem\"\r\n [(ngModel)]=\"model.Index\" />\r\n <label for=\"Index\">Index</label>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n\r\n <div class=\"col-sm-4\">\r\n <form>\r\n <div class=\"row\">\r\n <div class=\"col-sm-12\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <h3>POS Outlet Configuration</h3>\r\n </div>\r\n <div class=\"card-body mt-8\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div class=\"form-label-group\"\r\n [ngClass]=\"{'empty' : Constants.IsEmpty(model.POSOutlet)}\">\r\n <ng-select id=\"outletOrder\" class=\"center-text tall\"\r\n [items]=\"ListOutlet\" bindLabel=\"Outlet\" bindValue=\"Outlet\"\r\n placeholder=\"New Order To\" data-toggle=\"tooltip\"\r\n data-placement=\"top\"\r\n matTooltip=\"Choose Outlet where transaction is recorded\"\r\n [(ngModel)]=\"model.POSOutlet\" (change)=\"changeOutlet()\"\r\n name=\"Outlet\" #outlet=\"ngModel\" required>\r\n </ng-select>\r\n <label for=\"outletOrder\">New Order To</label>\r\n </div>\r\n <div class=\"alert alert-danger\"\r\n *ngIf=\"outlet.invalid && (outlet.dirty || outlet.touched)\">\r\n <span>Outlet is required!</span>\r\n </div>\r\n </div>\r\n <div class=\"col-md-12\">\r\n <div class=\"form-label-group\"\r\n [ngClass]=\"{'empty' : Constants.IsEmpty(model.POSDeliveryOutlet)}\">\r\n <ng-select id=\"inventorySource\" class=\"center-text tall\"\r\n [items]=\"ListOutlet\" bindLabel=\"Outlet\" bindValue=\"Outlet\"\r\n placeholder=\"Dispatch Orders From\" data-toggle=\"tooltip\"\r\n data-placement=\"top\"\r\n matTooltip=\"Choose outlet to be inventory source for marketplace \"\r\n [(ngModel)]=\"model.POSDeliveryOutlet\" name=\"Delivery\"\r\n #delivery=\"ngModel\" required>\r\n </ng-select>\r\n <label for=\"inventorySource\">Dispatch Orders From</label>\r\n </div>\r\n <div class=\"alert alert-danger\"\r\n *ngIf=\"delivery.invalid && (delivery.dirty || delivery.touched)\">\r\n <span>Outlet is required!</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-12\">\r\n <div class=\"form-label-group\"\r\n [ngClass]=\"{'empty' : Constants.IsEmpty(model.POSInventoryOutletArray)}\">\r\n <ng-select id=\"ProductInventory\" \r\n class=\"center-text tall multiple-select\"\r\n multiple=\"true\"\r\n [items]=\"ListOutlet\" \r\n bindLabel=\"Outlet\" \r\n bindValue=\"Outlet\"\r\n placeholder=\"Product Inventory\"\r\n data-toggle=\"tooltip\" data-placement=\"top\"\r\n matTooltip=\"Choose Outlet where inventory is recorded\"\r\n [(ngModel)]=\"model.POSInventoryOutletArray\"\r\n name=\"POSInventoryOutletArray\">\r\n </ng-select>\r\n <label for=\"ProductInventory\">Product Inventory</label>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-sm-12\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <h3>POS Orders Configuration</h3>\r\n </div>\r\n <div class=\"card-body mt-8\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div class=\"form-label-group\"\r\n [ngClass]=\"{'empty' : Constants.IsEmpty(model.POSInvoicePaymentMethod)}\">\r\n <ng-select class=\"center-text tall\" [items]=\"ListPaymentMethod\"\r\n bindLabel=\"Name\" bindValue=\"Name\" placeholder=\"Payment Method\"\r\n data-toggle=\"tootlip\" matTooltip=\"Choose your payment method\"\r\n [(ngModel)]=\"model.POSInvoicePaymentMethod\"\r\n name=\"InvoicePaymentMethod\" #method=\"ngModel\" required>\r\n </ng-select>\r\n <label>Payment Method</label>\r\n </div>\r\n <div class=\"alert alert-danger\"\r\n *ngIf=\"method.invalid && (method.dirty || method.touched)\">\r\n <span>Payment Method is required!</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-12\">\r\n <div class=\"form-label-group\"\r\n [ngClass]=\"{'empty' : Constants.IsEmpty(model.POSSalesOrderType)}\">\r\n <ng-select class=\"center-text tall\" [items]=\"ListSalesType\"\r\n bindLabel=\"Name\" bindValue=\"Name\" placeholder=\"Sales Orders Tag\"\r\n data-toggle=\"tooltip\"\r\n matTooltip=\"Choose sales order type for marketplace\"\r\n [(ngModel)]=\"model.POSSalesOrderType\" name=\"SalesType\"\r\n #sales=\"ngModel\" required>\r\n </ng-select>\r\n <label>Sales Orders Tag</label>\r\n </div>\r\n <div class=\"alert alert-danger\"\r\n *ngIf=\"sales.invalid && (sales.dirty || sales.touched)\">\r\n <span>Sales Orders is required!</span>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <div class=\"col-md-12\">\r\n <div class=\"form-label-group\"\r\n [ngClass]=\"{'empty' : Constants.IsEmpty(model.POSTax)}\">\r\n <ng-select class=\"center-text tall\" [items]=\"ListTax\"\r\n bindLabel=\"Name\" bindValue=\"Name\" placeholder=\"Tax\"\r\n [(ngModel)]=\"model.POSTax\" data-toggle=\"tooltip\"\r\n matTooltip=\"Choose tax type for marketplace\" name=\"POSTax\"\r\n #tax=\"ngModel\" required>\r\n </ng-select>\r\n <label>Tax</label>\r\n </div>\r\n <div class=\"alert alert-danger\"\r\n *ngIf=\"tax.invalid && (tax.dirty || tax.touched)\">\r\n <span>Tax Type is required!</span>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <div class=\"col-md-12\">\r\n <div class=\"form-label-group\"\r\n [ngClass]=\"{'empty' : Constants.IsEmpty(model.POSWriteOff)}\">\r\n <ng-select id=\"writeoff\" class=\"center-text tall\"\r\n [items]=\"ListWriteOff\" bindLabel=\"Name\" bindValue=\"Name\"\r\n placeholder=\"Write off\" data-toggle=\"tooltip\"\r\n matTooltip=\"Choose Writeoff\" [(ngModel)]=\"model.POSWriteOff\"\r\n name=\"POSWriteOff\">\r\n </ng-select>\r\n <label for=\"writeoff\">Write Off</label>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </content>\r\n</mainpanel>","import { Component, OnInit } from '@angular/core';\r\nimport { HttpService } from '../../../../services/http.service';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { ToastrService } from 'ngx-toastr';\r\n@Component({\r\n selector: 'app-marketplace-view',\r\n templateUrl: './marketplace-view.component.html',\r\n styleUrls: ['./marketplace-view.component.scss']\r\n})\r\nexport class MarketplaceViewComponent implements OnInit {\r\n pageData: any;\r\n data: any;\r\n ID: string;\r\n role :any;\r\n advance : boolean = false;\r\n constructor(private route: ActivatedRoute, private http: HttpService, private router: Router, private toastr: ToastrService) {\r\n this.advance = false;\r\n this.route.queryParams.subscribe(params => {\r\n this.ID = params['ID'];\r\n });\r\n if (this.ID != null) {\r\n this.Load();\r\n }\r\n\r\n\r\n }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n Load(): void {\r\n var req = {\r\n ID: this.ID\r\n }\r\n this.http.post<any>('/api/ChannelLoader/GetChannelView', req).subscribe(result => {\r\n this.data = result.Model;\r\n this.role = result.Roles\r\n if (this.data.LogMode == 1) {\r\n this.data.LogModeLabel = \"None\";\r\n }\r\n else if (this.data.LogMode == 2) {\r\n this.data.LogModeLabel = \"Error\";\r\n }\r\n else if (this.data.LogMode == 3) {\r\n this.data.LogModeLabel = \"Full\";\r\n }\r\n })\r\n }\r\n\r\n clear(): void {\r\n let result = confirm(\"Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace\");\r\n if (result) {\r\n var req = {\r\n ID: this.ID\r\n }\r\n this.http.post<any>('/api/Channel/ClearCacheChannel', req).subscribe(result => {\r\n this.toastr.success('Successfully cleared cache', \"Success\", {\r\n closeButton: true,\r\n positionClass: \"toast-bottom-right\"\r\n });\r\n this.Load();\r\n })\r\n }\r\n\r\n }\r\n\r\n shopeeAuthorize() {\r\n this.http.post<any>('/api/ChannelAuthorization/ShopeeV2_URL').subscribe(result => {\r\n window.location.href = result.Url;\r\n });\r\n }\r\n\r\n\r\n delete(model: any): void {\r\n let result = confirm(\"Delete channel \" + model.Name + \" ?\");\r\n if (result) {\r\n //Logic to delete the item\r\n var data = {\r\n ID : model.ID\r\n }\r\n this.http.post<any>('/api/Channel/DeleteChannel', data).subscribe(result => {\r\n this.toastr.success('Channel ' + model.Name + ' is deleted!', \"Success\", {\r\n closeButton: true,\r\n positionClass: \"toast-bottom-right\"\r\n });\r\n this.router.navigate(['menu/channel']);\r\n })\r\n }\r\n\r\n }\r\n\r\n\r\n\r\n}\r\n\r\n","<mainpanel [Title]=\"'Marketplace Configuration View'\" [pageData]=\"pageData\" [hideSearchBox]=\"true\"\r\n [hideSearchDropdown]=\"true\">\r\n <actions>\r\n <a [routerLink]=\"['/menu/channel/marketplace/cache']\" role=\"button\" class=\"btn btn-outline-secondary btn-lg me-2\" \r\n [queryParams]=\"{ID: ID}\">\r\n <i class=\"fas fa-archive\" style=\"font-size: 20px;\"></i> Cache \r\n </a>\r\n\r\n <div class=\"btn-group\" role=\"group\" aria-label=\"Basic example\">\r\n <a role=\"button\" class=\"btn btn-outline-secondary btn-lg \" [hidden]=\"!role?.Setup\"\r\n [routerLink]=\"['/menu/channel/marketplace/form',{ID:data?.ID}]\"><i class=\"fas fa-edit\"\r\n style=\"font-size: 20px;\"></i>Configure</a>\r\n <a role=\"button\" class=\"btn btn-danger btn-lg text-white\" [hidden]=\"!role?.Setup\"\r\n (click)=\"delete(data)\"><i class=\"fas fa-trash-alt\" style=\"font-size: 20px;\"></i> Delete</a>\r\n </div> \r\n\r\n \r\n </actions>\r\n <content>\r\n <div class=\"container-fluid py-5 bg-light-gray\" *ngIf=\"data\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-8\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-12\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <h3>Marketplace Setup</h3>\r\n </div>\r\n <div class=\"card-body mt-8\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-6\">\r\n <div class=\"info-label-group\">\r\n <label>Name</label>\r\n <div data-toggle=\"title\"\r\n matTooltip=\"Your shop name in marketplace channel\">\r\n <span>{{data.Name}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-6\" data-toggle=\"tooltip\"\r\n matTooltip=\"Your marketplace type, you can choose shopee or tokopedia\">\r\n <div class=\"info-label-group\">\r\n <label>Type</label>\r\n <div>\r\n <span>{{data.TypeString}}</span>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"col-sm-6\" *ngIf=\"data.TypeID != 2\">\r\n <div class=\"info-label-group\">\r\n <label>Shop ID</label>\r\n <div data-toggle=\"title\" matTooltip=\"Your shop ID\">\r\n <span>{{data.ShopID != 0 ? data.ShopID : data.ShopIDString }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-6\" *ngIf=\"data.TypeID == 0 || data.TypeID == 5\">\r\n <div class=\"info-label-group\">\r\n <label>Expired Date</label>\r\n <div data-toggle=\"title\" matTooltip=\"Your expired time shop\" class=\"w-100 d-flex justify-content-between\">\r\n <span class=\"text-primary\"> {{data.ExpiredTime | date : 'dd MMM yyyy HH:mm'}} </span>\r\n </div>\r\n <div matTooltipClass=\"unset-max-width-tooltip\" matTooltip=\"Extend Shopee Authorization Duration for an additional 1 year\" matTooltipPosition=\"above\">\r\n <a class=\"fas fa-plus-circle fa-lg ml-12\" *ngIf=\"data.TypeID == 0\" style=\"cursor:pointer;\" href=\"https://partner.shopeemobile.com/api/v1/shop/auth_partner?id=845458&token=af8476104ba1e0ec3052adc6a2682f59bf0eb5304970727b9848760edc97ae1e&redirect=https%3A%2F%2Fmarketplace.dealpos.app%2Fshopee\"></a>\r\n <a class=\"fas fa-plus-circle fa-lg ml-12\" *ngIf=\"data.TypeID == 5\" style=\"cursor:pointer;\" (click)=\"shopeeAuthorize()\"></a>\r\n </div>\r\n </div>\r\n </div> \r\n <div class=\"col-sm-6\">\r\n <div class=\"info-label-group\">\r\n <label>Marketplace URL</label>\r\n <div data-toggle=\"title\" matTooltip=\"Your Marketplace URL\">\r\n <span>{{data.URL}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-6\" *ngIf=\"data.TypeID == 2\">\r\n <div class=\"info-label-group\">\r\n <label>Consumer Key</label>\r\n <div data-toggle=\"title\" matTooltip=\"Consumer Key\">\r\n <span>{{data.ConsumerKey}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-6\" *ngIf=\"data.TypeID == 2\">\r\n <div class=\"info-label-group\">\r\n <label>Consumer Secret</label>\r\n <div data-toggle=\"title\" matTooltip=\"Consumer Secret\">\r\n <span>{{data.ConsumerSecret}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-6\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <div class=\"d-flex justify-content-between\">\r\n <h3>Sync</h3>\r\n </div>\r\n </div>\r\n <div class=\"card-body mt-8\" *ngIf=\"data\">\r\n <div class=\"info-label-group\" data-toggle=\"title\"\r\n matTooltip=\"Automatically sync your orders from channel to POS\">\r\n <label>Sync Order</label>\r\n <div>\r\n <span>{{data.SyncOrder }}</span>\r\n </div>\r\n </div>\r\n <div class=\"info-label-group\" data-toggle=\"title\"\r\n matTooltip=\"Automatically sync your POS inventory to channel inventory\">\r\n <label>Sync Inventory</label>\r\n <div>\r\n <span>{{data.SyncInventory }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-6\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <div class=\"d-flex justify-content-between\">\r\n <h3>Log</h3>\r\n </div>\r\n </div>\r\n <div class=\"card-body mt-8\" *ngIf=\"data\">\r\n <div class=\"info-label-group\" data-toggle=\"title\"\r\n matTooltip=\"Your Inventory log status\">\r\n <label style=\"top: -11px;background: white;\">Inventory Log</label>\r\n <div>\r\n <span *ngIf=\"data.InventoryLog == 1\">None</span>\r\n <span *ngIf=\"data.InventoryLog == 2\">Error</span>\r\n <span *ngIf=\"data.InventoryLog == 3\">Full</span>\r\n </div>\r\n </div>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-6\">\r\n <div class=\"card\">\r\n <div class=\"card-header cursor\">\r\n <h3>Advance</h3>\r\n </div>\r\n <div class=\"card-body mt-8\">\r\n <div class=\"info-label-group\" data-toggle=\"title\"\r\n matTooltip=\"regiter name from outlet\">\r\n <label>Register</label>\r\n <div>\r\n <span>{{data?.Register }}</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"info-label-group\">\r\n <label>Customer Default Email</label>\r\n <div data-toggle=\"title\" \r\n \r\n matTooltip=\"Default Email for all of customer for orders from channel\">\r\n <span>{{data?.CustomerDefaultEmail}}</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"info-label-group\" data-toggle=\"title\"\r\n \r\n matTooltip=\"Minimal inventory on channel, if product inventory is bellow minimum inventory will automatically update to 0 \">\r\n <label>Minimum Inventory</label>\r\n <div data-toggle=\"title\" title=\"Minimum Inventory\">\r\n <span>{{data?.MinimumInventory | number }}</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"info-label-group\">\r\n <label>Additional Item</label>\r\n <div data-toggle=\"title\" matTooltip=\"Additional item\">\r\n <span>{{data?.Additionalitem }}</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"info-label-group\">\r\n <label>Index</label>\r\n <div data-toggle=\"title\" matTooltip=\"Index\">\r\n <span>{{data?.Index }}</span>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <div class=\"card\">\r\n <div class=\"card-header cursor\">\r\n <h3>History</h3>\r\n </div>\r\n <div class=\"card-body mt-8\">\r\n <div class=\"info-label-group\" data-toggle=\"title\"\r\n matTooltip=\"the first date the channel was created \">\r\n <label>Created </label>\r\n <div>\r\n <span>{{data.Created | date : 'dd MMM yyyy HH:mm'}}</span>\r\n </div>\r\n </div>\r\n <div class=\"info-label-group\" data-toggle=\"title\"\r\n matTooltip=\"last date of data in channel\">\r\n <label>Modified </label>\r\n <div>\r\n <span>{{data.Modified | date : 'dd MMM yyyy HH:mm'}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-4\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-12\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <h3>POS Outlet Configuration</h3>\r\n </div>\r\n <div class=\"card-body mt-8\" *ngIf=\"data\">\r\n <div class=\"info-label-group\">\r\n <label>New Order To</label>\r\n <div data-toggle=\"title\"\r\n matTooltip=\"Outlet to record your order form marketplace\">\r\n <span>{{data.POSOutlet}}</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"info-label-group\">\r\n <label>Dispatch Orders From</label>\r\n <div data-toggle=\"title\"\r\n matTooltip=\"Outlet that will be inventory source for your channel inventory\">\r\n <span>{{data.POSDeliveryOutlet}}</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"info-label-group\">\r\n <label>Product Inventory</label>\r\n <div data-toggle=\"title\"\r\n matTooltip=\"Outlet where the inventory will displayed as inventory in Inventory Comparison Menu\">\r\n <span>{{data.POSInventoryOutlet}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-sm-12\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <div class=\"d-flex justify-content-between\">\r\n <h3>POS Orders Configuration</h3>\r\n </div>\r\n </div>\r\n <div class=\"card-body\" *ngIf=\"data\">\r\n <div class=\"info-label-group mt-5\">\r\n <label>Payment Method</label>\r\n <div data-toggle=\"title\"\r\n matTooltip=\"Your payment method for orders from channel\">\r\n <span>{{data.POSInvoicePaymentMethod}}</span>\r\n </div>\r\n </div>\r\n <div class=\"info-label-group\">\r\n <label>Tag</label>\r\n <div data-toggle=\"title\"\r\n matTooltip=\"Your orders tag in POS for orders from channel\">\r\n <span>{{data.POSSalesOrderType}}</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"info-label-group\">\r\n <label>Tax</label>\r\n <div data-toggle=\"title\" matTooltip=\"Tax for orders from channel\">\r\n <span>{{data.POSTax}}</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"info-label-group\">\r\n <label>Write off</label>\r\n <div data-toggle=\"title\" matTooltip=\"Write Off\">\r\n <span>{{data.POSWriteOff}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n \r\n\r\n\r\n </content>\r\n</mainpanel>","import { Component, OnInit } from '@angular/core';\r\nimport { Channel } from '../../../model/Channel';\r\nimport { HttpService } from '../../../services/http.service';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';\r\n\r\n@Component({\r\n selector: 'app-marketplace',\r\n templateUrl: './marketplace.component.html',\r\n styleUrls: ['./marketplace.component.scss']\r\n})\r\nexport class MarketplaceComponent implements OnInit {\r\n\r\n List: Channel[];\r\n pageData: any;\r\n role: any;\r\n\r\n public cdkDragDisabled: boolean;\r\n\r\n constructor(private http: HttpService, private toastr: ToastrService) {\r\n this.channel();\r\n this.pageData = {\r\n Title: \"Channel\",\r\n Nav: [\r\n { Title: 'Channel', Url: '/menu/channel', Active: true },\r\n { Title: 'POS', Url: '/menu/channel/config', Active: false }\r\n ]\r\n };\r\n this.cdkDragDisabled = true;\r\n }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n private channel(): void {\r\n this.http.post<any>('/api/Channel/GetChannel', {}).subscribe(result => {\r\n this.List = result.Data;\r\n this.role = result.Roles;\r\n for (let i of this.List) {\r\n if (i.POSOutlet != null && i.POSTax != null && i.POSInvoicePaymentMethod != null && i.POSSalesOrderType != null) {\r\n i.IsComplete = true;\r\n }\r\n }\r\n })\r\n }\r\n\r\n test(model: any): void {\r\n this.http.post<any>('/api/Channel/TestShopID', model).subscribe(result => {\r\n let data: string = \"\";\r\n this.channel();\r\n for (var key in result) {\r\n data += key + \" : \" + result[key] + \"<br/>\";\r\n }\r\n\r\n this.toastr.success(data, \"Success\", {\r\n enableHtml: true,\r\n closeButton: true,\r\n positionClass: \"toast-bottom-right\"\r\n });\r\n })\r\n }\r\n\r\n delete(model: any): void {\r\n let result = confirm(\"Want to delete?\");\r\n if (result) {\r\n //Logic to delete the item\r\n this.http.post<any>('/api/Channel/DeleteChannel', model).subscribe(result => {\r\n this.channel();\r\n })\r\n }\r\n\r\n }\r\n \r\n public onDrop(event: CdkDragDrop<string[]>) {\r\n moveItemInArray(this.List, event.previousIndex, event.currentIndex);\r\n }\r\n\r\n public onSaveDragAndDrop() {\r\n this.cdkDragDisabled = true;\r\n this.http.post(\"/api/Channel/UpdateChannelIndex\", this.List)\r\n .subscribe({\r\n next: () => {\r\n this.toastr.success(\"Channel list successfully saved\", \"Success\");\r\n }\r\n })\r\n }\r\n\r\n public filterProductInventory(productInventory: string[], from: number, to: number): string {\r\n let splitName = productInventory;\r\n splitName = splitName.filter((val, i) => {\r\n i += 1;\r\n return i >= from && i <= to;\r\n });\r\n let productInventoryName = splitName.join(', ');\r\n return productInventoryName;\r\n }\r\n}\r\n","<mainpanel [Title]=\"'Marketplace'\" [pageData]=\"pageData\" [hideSearchBox]=\"true\" [hideSearchDropdown]=\"true\">\r\n <actions>\r\n <a *ngIf=\"role?.Setup\" role=\"button\" class=\"btn btn-success btn-fill btn-lg text-white\"\r\n routerLink=\"/menu/channel/marketplace/add\">Add</a>\r\n <ng-container *ngIf=\"!cdkDragDisabled else SORT_BTN\">\r\n <button class=\"btn btn-outline-secondary btn-lg me-3\" (click)=\"onSaveDragAndDrop()\"\r\n title=\"Drag and drop the rows of the table below to the order you want then click Save\"\r\n style=\"float: left\">\r\n <i class=\"fa fa-arrows-alt-v me-3\"></i>Save Changes\r\n </button>\r\n </ng-container>\r\n\r\n <ng-template #SORT_BTN>\r\n <button class=\"btn btn-outline-secondary btn-lg me-3\" (click)=\"cdkDragDisabled = !cdkDragDisabled \"\r\n title=\"Drag and drop the rows of the table below to the order you want then click Save\"\r\n style=\"float: left\">\r\n <i class=\"fa fa-arrows-alt-v me-3\"></i>Sort\r\n </button>\r\n </ng-template>\r\n </actions>\r\n <content>\r\n <div class=\"container-fluid mt-3\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div class=\"table-responsive\">\r\n\r\n <table class=\"table table-hover\">\r\n <thead>\r\n <tr class=\"table-light\">\r\n <th></th>\r\n <th>Channel</th>\r\n <th>Sync Info</th>\r\n <th>POS Outlet</th>\r\n <th>POS Orders</th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody cdkDropList (cdkDropListDropped)=\"onDrop($event)\">\r\n <tr *ngFor=\"let item of List\" \r\n [cdkDragDisabled]=\"cdkDragDisabled\" \r\n [ngClass]=\"{'bg-err': !item?.IsComplete }\" cdkDrag>\r\n <td style=\"text-align: right;\">\r\n <a [routerLink]=\"['/menu/channel/marketplace/view']\"\r\n [queryParams]=\"{ID: item.ID}\">\r\n <img *ngIf=\"item?.TypeID == 1\" style=\"width: 30px;\"\r\n src=\"https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png\" />\r\n <img *ngIf=\"item?.TypeID == 0\" style=\"width: 30px;\"\r\n src=\"https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png\" />\r\n <img *ngIf=\"item?.TypeID == 2\" style=\"width: 30px;\"\r\n src=\"https://res.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp\" />\r\n <img *ngIf=\"item?.TypeID == 4\" style=\"width: 30px;\"\r\n src=\"https://res.cloudinary.com/pos/image/upload/v1639725279/icons/marketplace_icons/kalcare.png\" />\r\n <img *ngIf=\"item?.TypeID == 5\" style=\"width: 30px;\"\r\n src=\"https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png\" />\r\n <img *ngIf=\"item?.TypeID == 6\" style=\"width: 30px;\"\r\n src=\"https://res.cloudinary.com/pos/image/upload/w_40/v1645761611/icons/Marketplace%20logo/tiktok.png\" />\r\n\r\n </a>\r\n </td>\r\n <td>\r\n <a [routerLink]=\"['/menu/channel/marketplace/view']\"\r\n [queryParams]=\"{ID: item.ID}\">\r\n <span style=\"font-size: 16px;\">{{item?.Name}}</span>\r\n </a>\r\n <br>\r\n {{item?.URL}} <br>\r\n\r\n </td>\r\n <td style=\"font-size:12px;\">\r\n <div class=\"mb-3\">Sync Orders: <span style=\"color: blue;\">\r\n {{item?.SyncOrder}}</span></div>\r\n <div class=\"mb-3\"> Product Sync: <span style=\"color: blue;\">{{item?.LastSync |\r\n date: 'dd MMM yyyy HH:mm'}}</span></div>\r\n <div *ngIf=\"item.TypeID == 0 || item.TypeID == 5\"> Expiration: <span\r\n class=\"text-danger\">{{item?.ExpiredTime | date: 'dd MMM yyyy'}}</span>\r\n </div>\r\n </td>\r\n\r\n <td style=\"font-size:12px;\">\r\n <div class=\"mb-3\">New Order To: <span style=\"color: blue;\">\r\n {{item?.POSOutlet}}</span> </div>\r\n\r\n <div class=\"mb-3\">Dispatch Orders From: <span style=\"color: blue;\">\r\n {{item?.POSDeliveryOutlet}}</span></div>\r\n <div class=\"mb-3 d-flex align-items-center\">Product Inventory: \r\n <span style=\"color: blue;\" *ngIf=\"item?.POSInventoryOutlet else SUM_Outlet\">\r\n {{filterProductInventory(item.POSInventoryOutletArray, 1, 3)}},\r\n <span class=\"cursor-pointer\" \r\n *ngIf=\"item.POSInventoryOutletArray.length > 3\"\r\n [matTooltip]=\"filterProductInventory(item.POSInventoryOutletArray, 4, item.POSInventoryOutletArray.length)\">\r\n <button type=\"button\" class=\"btn btn-circle btn-sm\">\r\n {{item.POSInventoryOutletArray.length - 3}}\r\n </button>\r\n </span>\r\n </span>\r\n\r\n <ng-template #SUM_Outlet>\r\n <span style=\"color: blue;\">\r\n [SUM All Outlet]\r\n </span>\r\n </ng-template>\r\n </div>\r\n <div class=\"mb-3\">Minimum Inventory: <span style=\"color: blue;\">\r\n {{item?.MinimumInventory}}</span></div>\r\n <div class=\"mb-3\" *ngIf=\"item?.Additionalitem\">Additional Item: <span\r\n style=\"color: blue;\"> {{item?.Additionalitem}}</span></div>\r\n\r\n </td>\r\n <td style=\"font-size:12px;\">\r\n <div class=\"mb-3\">Payment: <span\r\n style=\"color: blue;\">{{item?.POSInvoicePaymentMethod}}</span></div>\r\n <div class=\"mb-3\">Tag: <span style=\"color: blue;\">\r\n {{item?.POSSalesOrderType}}</span></div>\r\n <div class=\"mb-3\" [ngClass]=\"{'text-danger' : item?.POSTax === null}\">Tax :\r\n <span style=\"color: blue;\">{{item?.POSTax ? item?.POSTax : '-'}}</span>\r\n </div>\r\n\r\n\r\n </td>\r\n <td>\r\n <button class=\"btn btn-outline-success mb-3 ms-2 btn-sm\"\r\n [hidden]=\"item?.TypeID == 4\" (click)=\"test(item)\">Test</button>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n </content>\r\n</mainpanel>","import { Component, OnInit } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { POS } from '../../../../model/Channel';\r\nimport { Channel } from '../../../../model/Channel'\r\nimport { HttpService } from '../../../../services/http.service';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { CheckbrowserService } from 'src/app/services/checkbrowser.service';\r\n\r\n\r\n@Component({\r\n selector: 'app-edit',\r\n templateUrl: './edit.component.html',\r\n styleUrls: ['./edit.component.scss']\r\n})\r\nexport class EditComponent implements OnInit {\r\n\r\n pass: boolean = false;\r\n form: POS = new POS();\r\n pageData: any;\r\n ListOutlet: any;\r\n\r\n //For eye toggle icon : https://stackoverflow.com/questions/46815831/how-to-create-login-in-ionic-2-with-show-hide-password\r\n passwordType: string = 'password';\r\n passwordIcon: string = 'eye-off';\r\n\r\n browser: string;\r\n\r\n constructor(private http: HttpService, private _router: Router, private toastr: ToastrService, private checkBrowser: CheckbrowserService) {\r\n this.pageData = {\r\n Title: \"POS\",\r\n Nav: [\r\n { Title: 'Channel', Url: '/menu/channel', Active: false },\r\n { Title: 'POS', Url: '/menu/channel/config', Active: true }\r\n ]\r\n }\r\n this.LoaderChannel();\r\n }\r\n\r\n\r\n\r\n ngOnInit(): void {\r\n this.browser = this.checkBrowser.getBrowserName();\r\n\r\n }\r\n\r\n //Function: hideShowPassword() will toggle the password visibility with the eye icon\r\n hideShowPassword() {\r\n this.passwordType = this.passwordType === 'text' ? 'password' : 'text';\r\n this.passwordIcon = this.passwordIcon === 'eye-off' ? 'eye' : 'eye-off';\r\n\r\n\r\n }\r\n\r\n LoaderChannel(): void {\r\n this.http.post<any>('/api/ChannelLoader/GetConfig', {}).subscribe(result => {\r\n this.form = result.Form;\r\n this.ListOutlet = result.Options.ListOutlet;\r\n })\r\n }\r\n\r\n SubmitHost(): void {\r\n this.http.post<any>('/api/Channel/SubmitConfig', this.form).subscribe(result => {\r\n this.toastr.success(\"Successfully Edited POS Config!\", \"Success!\");\r\n this._router.navigate(['menu/channel']);\r\n })\r\n }\r\n\r\n Refresh(): void {\r\n this.http.post<any>('/api/POSAccount/Remove', this.form).subscribe(result => {\r\n this.toastr.success(\"sucess\", \"Success\", {\r\n closeButton: true,\r\n positionClass: \"toast-bottom-right\"\r\n });\r\n })\r\n }\r\n\r\n\r\n\r\n\r\n Constants = {\r\n GuidEmpty: '00000000-0000-0000-0000-000000000000',\r\n IsEmpty(input): boolean {\r\n return input == null || input == undefined || input == this.GuidEmpty;\r\n }\r\n }\r\n\r\n\r\n}\r\n","<mainpanel [Title]=\"'POS Edit'\" [pageData]=\"pageData\" [hideSearchBox]=\"true\" [hideSearchDropdown]=\"true\" >\r\n <actions>\r\n <a role=\"button\" class=\"btn btn-secondary btn-fill btn-lg me-3\" routerLink=\"/menu/channel\">Cancel</a>\r\n <a role=\"button\" class=\"btn btn-success btn-fill btn-lg text-white\" (click)=\"SubmitHost()\">Save</a>\r\n </actions>\r\n <content>\r\n <div class=\"container-fluid mt-3\">\r\n <div class=\"row mt-5\">\r\n <div class=\"col-md-6\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <h4>Credentials</h4>\r\n </div>\r\n <div class=\"card-body mt-8\">\r\n <div class=\"form-label-group\">\r\n <input type=\"text\" id=\"Host\" class=\"form-control\" [(ngModel)]=\"form.Host\" name=\"Host\" data-toggle=\"tooltip\" title=\"Host\"/>\r\n <label for=\"Host\">Host</label>\r\n </div>\r\n <div class=\"form-label-group\">\r\n <input type=\"text\" id=\"Username\" class=\"form-control\" [(ngModel)]=\"form.Username\" name=\"Username\" data-toggle=\"tooltip\" title=\"Username\" />\r\n <label for=\"Username\">Username</label>\r\n </div>\r\n \r\n <div class=\"form-label-group\">\r\n <input type=\"text\" id=\"ClientSecretGuid\" class=\"form-control\" [(ngModel)]=\"form.ClientSecretGuid\" name=\"ClientSecretGuid\" data-toggle=\"tooltip\" title=\"ClientSecretGuid\" />\r\n <label for=\"ClientSecretGuid\">ClientSecretGuid</label>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <h4>Configuration</h4>\r\n </div>\r\n <div class=\"card-body mt-8\">\r\n <!-- TODO: add inventory in channel model -->\r\n \r\n <div class=\"form-label-group radio\">\r\n <label for=\"OrderPaymentAmountType\">Order Payment Type</label>\r\n <div class=\"mt-3\">\r\n <mat-radio-group [(ngModel)]=\"form.OrderPaymentAmountType\">\r\n <mat-radio-button [value]=\"0\" class=\"me-5\" data-toggle=\"tooltip\" title=\"Received Amount is cut by administration cost or tax\">\r\n Escrow Amount\r\n </mat-radio-button>\r\n <mat-radio-button [value]=\"1\" class=\"me-5\" data-toggle=\"tootip\" title=\"Received full amount from transaction payment\">\r\n Full Amount\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-label-group radio\">\r\n <label for=\"OrderPaymentAmountType\">Composite Inventory</label>\r\n <div class=\"mt-3\">\r\n <mat-radio-group [(ngModel)]=\"form.CompositeVisible\">\r\n <mat-radio-button [value]=\"false\" class=\"me-5\" data-toggle=\"tooltip\" title=\"No support composite and trigger component\">\r\n No\r\n </mat-radio-button>\r\n <mat-radio-button [value]=\"true\" class=\"me-5\" data-toggle=\"tootip\" title=\"Support composite and trigger component\">\r\n Yes\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-label-group radio\" *ngIf=\"form.CompositeVisible\">\r\n <label for=\"OrderPaymentAmountType\">Include Parent</label>\r\n <div class=\"mt-3\">\r\n <mat-radio-group [(ngModel)]=\"form.IncludeParentInventory\">\r\n <mat-radio-button [value]=\"false\" class=\"me-5\" data-toggle=\"tooltip\" title=\"No include variant parent component\">\r\n No\r\n </mat-radio-button>\r\n <mat-radio-button [value]=\"true\" class=\"me-5\" data-toggle=\"tootip\" title=\"include variant parent component\">\r\n Yes\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-label-group radio\" *ngIf=\"form.CompositeVisible\">\r\n <label for=\"OrderPaymentAmountType\">Include Child</label>\r\n <div class=\"mt-3\">\r\n <mat-radio-group [(ngModel)]=\"form.IncludeChildrenInventory\">\r\n <mat-radio-button [value]=\"false\" class=\"me-5\" data-toggle=\"tooltip\" title=\"No Include variant child component\">\r\n No\r\n </mat-radio-button>\r\n <mat-radio-button [value]=\"true\" class=\"me-5\" data-toggle=\"tootip\" title=\"Include Include variant child component\">\r\n Yes\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </content>\r\n</mainpanel>\r\n\r\n\r\n\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { POS } from '../../../model/Channel';\r\nimport { HttpService } from '../../../services/http.service';\r\nimport { ToastrService } from 'ngx-toastr';\r\n\r\n\r\n@Component({\r\n selector: 'app-pos',\r\n templateUrl: './pos.component.html',\r\n styleUrls: ['./pos.component.scss']\r\n})\r\nexport class PosComponent implements OnInit {\r\n\r\n form : POS = new POS();\r\n data: any;\r\n pageData:any;\r\n ListOutlet : any;\r\n constructor(private http: HttpService, private _router: Router, private toastr: ToastrService) { \r\n this.pageData = {\r\n Title : \"POS\",\r\n Nav : [\r\n { Title : 'Channel' , Url : '/menu/channel', Active : false},\r\n { Title : 'POS' , Url : '/menu/channel/config', Active : true}\r\n ]\r\n }\r\n this.LoaderChannel(); \r\n }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n LoaderChannel() : void{\r\n this.http.post<any>('/api/ChannelLoader/GetConfig',{}).subscribe(result=>{\r\n this.form = result.Form;\r\n this.ListOutlet = result.Options ? result.Options.ListOutlet : [];\r\n })\r\n }\r\n\r\n SubmitHost():void{\r\n this.http.post<any>('/api/Channel/SubmitConfig',this.form).subscribe(result=>{ \r\n this._router.navigate(['menu/channel']);\r\n })\r\n }\r\n\r\n Refresh():void{\r\n this.http.post<any>('/api/POSAccount/Remove', this.form).subscribe(result=>{ \r\n this.toastr.success(\"Token has been refreshed!\", \"Success\", {\r\n closeButton: true,\r\n positionClass: \"toast-bottom-right\"\r\n });\r\n })\r\n }\r\n\r\n test(): void {\r\n this.http.post<any>('/api/POSAccount/Test', this.form).subscribe(result=>{ \r\n this.toastr.success(\"Test was successful!\", \"Success\", {\r\n closeButton: true,\r\n positionClass: \"toast-bottom-right\"\r\n });\r\n })\r\n }\r\n\r\n Constants = {\r\n GuidEmpty: '00000000-0000-0000-0000-000000000000',\r\n IsEmpty(input): boolean {\r\n return input == null || input == undefined || input == this.GuidEmpty;\r\n }\r\n}\r\n\r\n}\r\n","<mainpanel [Title]=\"'POS'\" [pageData]=\"pageData\" [hideSearchBox]=\"true\" [hideSearchDropdown]=\"true\" >\r\n <actions>\r\n <a role=\"button\" class=\"btn btn-outline-success btn-lg text-success me-2\" (click)=\"Refresh()\">Refresh Token</a>\r\n\r\n <a role=\"button\" class=\"btn btn-outline-success btn-lg text-success me-2\" (click)=\"test()\">Validate Client Secret Guid</a>\r\n\r\n <a role=\"button\" class=\"btn btn-success btn-fill btn-lg text-white\" [routerLink]=\"['/menu/channel/pos/edit']\"><i class=\"fas fa-edit\" style=\"font-size: 20px;\"></i> Edit</a>\r\n \r\n \r\n </actions>\r\n <content>\r\n <div class=\"container-fluid mt-3\">\r\n <div class=\"row mt-5\">\r\n <div class=\"col-md-6\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <h4>Credentials</h4>\r\n </div>\r\n <div class=\"card-body mt-8\">\r\n <div class=\"form-label-group\">\r\n <input type=\"text\" id=\"Host\" class=\"form-control\" [(ngModel)]=\"form.Host\" name=\"Host\" data-toggle=\"tooltip\" title=\"Host\" readonly />\r\n <label for=\"Host\">Host</label>\r\n </div>\r\n <div class=\"form-label-group\">\r\n <input type=\"text\" id=\"Username\" class=\"form-control\" [(ngModel)]=\"form.Username\" name=\"Username\" data-toggle=\"tooltip\" title=\"Username\" readonly />\r\n <label for=\"Username\">Username</label>\r\n </div>\r\n \r\n <div class=\"form-label-group\">\r\n <input type=\"text\" id=\"ClientSecretGuid\" class=\"form-control\" [(ngModel)]=\"form.ClientSecretGuid\" name=\"ClientSecretGuid\" data-toggle=\"tooltip\" title=\"ClientSecretGuid\" readonly />\r\n <label for=\"ClientSecretGuid\">ClientSecretGuid</label>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <h4>Configuration</h4>\r\n </div>\r\n <div class=\"card-body mt-8\">\r\n <!-- TODO: add inventory in channel model -->\r\n \r\n <div class=\"info-label-group\" *ngIf=\"form.OrderPaymentAmountType == 1\">\r\n <label>Order Payment Type</label>\r\n <div>\r\n <span>Full Amount</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"info-label-group\" *ngIf=\"form.OrderPaymentAmountType == 0\">\r\n <label>Order Payment Type</label>\r\n <div>\r\n <span> Escrow Amount</span>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"info-label-group\">\r\n <label>Composite Inventory</label>\r\n <div>\r\n <span> {{form.CompositeVisible}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </content>\r\n</mainpanel>\r\n\r\n\r\n\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, Input, NgModule } from '@angular/core';\r\nimport { RouterModule } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'nav-tab',\r\n templateUrl: './nav-tab.component.html',\r\n styleUrls: ['./nav-tab.component.scss']\r\n})\r\nexport class NavTabComponent {\r\n @Input() Tabs :any[];\r\n \r\n}\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n RouterModule\r\n ],\r\n declarations: [\r\n NavTabComponent\r\n ],\r\n exports: [\r\n NavTabComponent\r\n ]\r\n})\r\nexport class NavTabModule { }\r\n","<ul class=\"nav navbar-nav navbar-left nav-tab-arrow\">\r\n <li routerLinkActive=\"active\" class=\"nav-item me-6\" *ngFor=\"let tabMenu of Tabs\">\r\n <a class=\"nav-link nav-link-arrow mb-0\" routerLink=\"{{tabMenu.Url}}\">\r\n {{tabMenu.Title}}\r\n </a>\r\n </li>\r\n</ul>","import { asyncScheduler } from '../scheduler/async';\nimport { timer } from './timer';\nexport function interval(period = 0, scheduler = asyncScheduler) {\n if (period < 0) {\n period = 0;\n }\n return timer(period, period, scheduler);\n}\n","import * as i0 from '@angular/core';\nimport { Injectable, Inject, InjectionToken, Directive, Input, EventEmitter, Optional, SkipSelf, Output, Self, ContentChildren, ContentChild, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport * as i1 from '@angular/cdk/scrolling';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\nimport { _getEventTarget, normalizePassiveListenerOptions, _getShadowRoot } from '@angular/cdk/platform';\nimport { coerceBooleanProperty, coerceElement, coerceArray, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { isFakeTouchstartFromScreenReader, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';\nimport { Subject, Subscription, interval, animationFrameScheduler, Observable, merge } from 'rxjs';\nimport { takeUntil, startWith, map, take, tap, switchMap } from 'rxjs/operators';\nimport * as i3 from '@angular/cdk/bidi';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Shallow-extends a stylesheet object with another stylesheet-like object.\n * Note that the keys in `source` have to be dash-cased.\n * @docs-private\n */\nfunction extendStyles(dest, source, importantProperties) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n const value = source[key];\n if (value) {\n dest.setProperty(key, value, importantProperties?.has(key) ? 'important' : '');\n }\n else {\n dest.removeProperty(key);\n }\n }\n }\n return dest;\n}\n/**\n * Toggles whether the native drag interactions should be enabled for an element.\n * @param element Element on which to toggle the drag interactions.\n * @param enable Whether the drag interactions should be enabled.\n * @docs-private\n */\nfunction toggleNativeDragInteractions(element, enable) {\n const userSelect = enable ? '' : 'none';\n extendStyles(element.style, {\n 'touch-action': enable ? '' : 'none',\n '-webkit-user-drag': enable ? '' : 'none',\n '-webkit-tap-highlight-color': enable ? '' : 'transparent',\n 'user-select': userSelect,\n '-ms-user-select': userSelect,\n '-webkit-user-select': userSelect,\n '-moz-user-select': userSelect,\n });\n}\n/**\n * Toggles whether an element is visible while preserving its dimensions.\n * @param element Element whose visibility to toggle\n * @param enable Whether the element should be visible.\n * @param importantProperties Properties to be set as `!important`.\n * @docs-private\n */\nfunction toggleVisibility(element, enable, importantProperties) {\n extendStyles(element.style, {\n position: enable ? '' : 'fixed',\n top: enable ? '' : '0',\n opacity: enable ? '' : '0',\n left: enable ? '' : '-999em',\n }, importantProperties);\n}\n/**\n * Combines a transform string with an optional other transform\n * that exited before the base transform was applied.\n */\nfunction combineTransforms(transform, initialTransform) {\n return initialTransform && initialTransform != 'none'\n ? transform + ' ' + initialTransform\n : transform;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Parses a CSS time value to milliseconds. */\nfunction parseCssTimeUnitsToMs(value) {\n // Some browsers will return it in seconds, whereas others will return milliseconds.\n const multiplier = value.toLowerCase().indexOf('ms') > -1 ? 1 : 1000;\n return parseFloat(value) * multiplier;\n}\n/** Gets the transform transition duration, including the delay, of an element in milliseconds. */\nfunction getTransformTransitionDurationInMs(element) {\n const computedStyle = getComputedStyle(element);\n const transitionedProperties = parseCssPropertyValue(computedStyle, 'transition-property');\n const property = transitionedProperties.find(prop => prop === 'transform' || prop === 'all');\n // If there's no transition for `all` or `transform`, we shouldn't do anything.\n if (!property) {\n return 0;\n }\n // Get the index of the property that we're interested in and match\n // it up to the same index in `transition-delay` and `transition-duration`.\n const propertyIndex = transitionedProperties.indexOf(property);\n const rawDurations = parseCssPropertyValue(computedStyle, 'transition-duration');\n const rawDelays = parseCssPropertyValue(computedStyle, 'transition-delay');\n return (parseCssTimeUnitsToMs(rawDurations[propertyIndex]) +\n parseCssTimeUnitsToMs(rawDelays[propertyIndex]));\n}\n/** Parses out multiple values from a computed style into an array. */\nfunction parseCssPropertyValue(computedStyle, name) {\n const value = computedStyle.getPropertyValue(name);\n return value.split(',').map(part => part.trim());\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Gets a mutable version of an element's bounding `ClientRect`. */\nfunction getMutableClientRect(element) {\n const clientRect = element.getBoundingClientRect();\n // We need to clone the `clientRect` here, because all the values on it are readonly\n // and we need to be able to update them. Also we can't use a spread here, because\n // the values on a `ClientRect` aren't own properties. See:\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes\n return {\n top: clientRect.top,\n right: clientRect.right,\n bottom: clientRect.bottom,\n left: clientRect.left,\n width: clientRect.width,\n height: clientRect.height,\n x: clientRect.x,\n y: clientRect.y,\n };\n}\n/**\n * Checks whether some coordinates are within a `ClientRect`.\n * @param clientRect ClientRect that is being checked.\n * @param x Coordinates along the X axis.\n * @param y Coordinates along the Y axis.\n */\nfunction isInsideClientRect(clientRect, x, y) {\n const { top, bottom, left, right } = clientRect;\n return y >= top && y <= bottom && x >= left && x <= right;\n}\n/**\n * Updates the top/left positions of a `ClientRect`, as well as their bottom/right counterparts.\n * @param clientRect `ClientRect` that should be updated.\n * @param top Amount to add to the `top` position.\n * @param left Amount to add to the `left` position.\n */\nfunction adjustClientRect(clientRect, top, left) {\n clientRect.top += top;\n clientRect.bottom = clientRect.top + clientRect.height;\n clientRect.left += left;\n clientRect.right = clientRect.left + clientRect.width;\n}\n/**\n * Checks whether the pointer coordinates are close to a ClientRect.\n * @param rect ClientRect to check against.\n * @param threshold Threshold around the ClientRect.\n * @param pointerX Coordinates along the X axis.\n * @param pointerY Coordinates along the Y axis.\n */\nfunction isPointerNearClientRect(rect, threshold, pointerX, pointerY) {\n const { top, right, bottom, left, width, height } = rect;\n const xThreshold = width * threshold;\n const yThreshold = height * threshold;\n return (pointerY > top - yThreshold &&\n pointerY < bottom + yThreshold &&\n pointerX > left - xThreshold &&\n pointerX < right + xThreshold);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Keeps track of the scroll position and dimensions of the parents of an element. */\nclass ParentPositionTracker {\n constructor(_document) {\n this._document = _document;\n /** Cached positions of the scrollable parent elements. */\n this.positions = new Map();\n }\n /** Clears the cached positions. */\n clear() {\n this.positions.clear();\n }\n /** Caches the positions. Should be called at the beginning of a drag sequence. */\n cache(elements) {\n this.clear();\n this.positions.set(this._document, {\n scrollPosition: this.getViewportScrollPosition(),\n });\n elements.forEach(element => {\n this.positions.set(element, {\n scrollPosition: { top: element.scrollTop, left: element.scrollLeft },\n clientRect: getMutableClientRect(element),\n });\n });\n }\n /** Handles scrolling while a drag is taking place. */\n handleScroll(event) {\n const target = _getEventTarget(event);\n const cachedPosition = this.positions.get(target);\n if (!cachedPosition) {\n return null;\n }\n const scrollPosition = cachedPosition.scrollPosition;\n let newTop;\n let newLeft;\n if (target === this._document) {\n const viewportScrollPosition = this.getViewportScrollPosition();\n newTop = viewportScrollPosition.top;\n newLeft = viewportScrollPosition.left;\n }\n else {\n newTop = target.scrollTop;\n newLeft = target.scrollLeft;\n }\n const topDifference = scrollPosition.top - newTop;\n const leftDifference = scrollPosition.left - newLeft;\n // Go through and update the cached positions of the scroll\n // parents that are inside the element that was scrolled.\n this.positions.forEach((position, node) => {\n if (position.clientRect && target !== node && target.contains(node)) {\n adjustClientRect(position.clientRect, topDifference, leftDifference);\n }\n });\n scrollPosition.top = newTop;\n scrollPosition.left = newLeft;\n return { top: topDifference, left: leftDifference };\n }\n /**\n * Gets the scroll position of the viewport. Note that we use the scrollX and scrollY directly,\n * instead of going through the `ViewportRuler`, because the first value the ruler looks at is\n * the top/left offset of the `document.documentElement` which works for most cases, but breaks\n * if the element is offset by something like the `BlockScrollStrategy`.\n */\n getViewportScrollPosition() {\n return { top: window.scrollY, left: window.scrollX };\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Creates a deep clone of an element. */\nfunction deepCloneNode(node) {\n const clone = node.cloneNode(true);\n const descendantsWithId = clone.querySelectorAll('[id]');\n const nodeName = node.nodeName.toLowerCase();\n // Remove the `id` to avoid having multiple elements with the same id on the page.\n clone.removeAttribute('id');\n for (let i = 0; i < descendantsWithId.length; i++) {\n descendantsWithId[i].removeAttribute('id');\n }\n if (nodeName === 'canvas') {\n transferCanvasData(node, clone);\n }\n else if (nodeName === 'input' || nodeName === 'select' || nodeName === 'textarea') {\n transferInputData(node, clone);\n }\n transferData('canvas', node, clone, transferCanvasData);\n transferData('input, textarea, select', node, clone, transferInputData);\n return clone;\n}\n/** Matches elements between an element and its clone and allows for their data to be cloned. */\nfunction transferData(selector, node, clone, callback) {\n const descendantElements = node.querySelectorAll(selector);\n if (descendantElements.length) {\n const cloneElements = clone.querySelectorAll(selector);\n for (let i = 0; i < descendantElements.length; i++) {\n callback(descendantElements[i], cloneElements[i]);\n }\n }\n}\n// Counter for unique cloned radio button names.\nlet cloneUniqueId = 0;\n/** Transfers the data of one input element to another. */\nfunction transferInputData(source, clone) {\n // Browsers throw an error when assigning the value of a file input programmatically.\n if (clone.type !== 'file') {\n clone.value = source.value;\n }\n // Radio button `name` attributes must be unique for radio button groups\n // otherwise original radio buttons can lose their checked state\n // once the clone is inserted in the DOM.\n if (clone.type === 'radio' && clone.name) {\n clone.name = `mat-clone-${clone.name}-${cloneUniqueId++}`;\n }\n}\n/** Transfers the data of one canvas element to another. */\nfunction transferCanvasData(source, clone) {\n const context = clone.getContext('2d');\n if (context) {\n // In some cases `drawImage` can throw (e.g. if the canvas size is 0x0).\n // We can't do much about it so just ignore the error.\n try {\n context.drawImage(source, 0, 0);\n }\n catch { }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Options that can be used to bind a passive event listener. */\nconst passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });\n/** Options that can be used to bind an active event listener. */\nconst activeEventListenerOptions = normalizePassiveListenerOptions({ passive: false });\n/**\n * Time in milliseconds for which to ignore mouse events, after\n * receiving a touch event. Used to avoid doing double work for\n * touch devices where the browser fires fake mouse events, in\n * addition to touch events.\n */\nconst MOUSE_EVENT_IGNORE_TIME = 800;\n/** Inline styles to be set as `!important` while dragging. */\nconst dragImportantProperties = new Set([\n // Needs to be important, because some `mat-table` sets `position: sticky !important`. See #22781.\n 'position',\n]);\n/**\n * Reference to a draggable item. Used to manipulate or dispose of the item.\n */\nclass DragRef {\n constructor(element, _config, _document, _ngZone, _viewportRuler, _dragDropRegistry) {\n this._config = _config;\n this._document = _document;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._dragDropRegistry = _dragDropRegistry;\n /**\n * CSS `transform` applied to the element when it isn't being dragged. We need a\n * passive transform in order for the dragged element to retain its new position\n * after the user has stopped dragging and because we need to know the relative\n * position in case they start dragging again. This corresponds to `element.style.transform`.\n */\n this._passiveTransform = { x: 0, y: 0 };\n /** CSS `transform` that is applied to the element while it's being dragged. */\n this._activeTransform = { x: 0, y: 0 };\n /**\n * Whether the dragging sequence has been started. Doesn't\n * necessarily mean that the element has been moved.\n */\n this._hasStartedDragging = false;\n /** Emits when the item is being moved. */\n this._moveEvents = new Subject();\n /** Subscription to pointer movement events. */\n this._pointerMoveSubscription = Subscription.EMPTY;\n /** Subscription to the event that is dispatched when the user lifts their pointer. */\n this._pointerUpSubscription = Subscription.EMPTY;\n /** Subscription to the viewport being scrolled. */\n this._scrollSubscription = Subscription.EMPTY;\n /** Subscription to the viewport being resized. */\n this._resizeSubscription = Subscription.EMPTY;\n /** Cached reference to the boundary element. */\n this._boundaryElement = null;\n /** Whether the native dragging interactions have been enabled on the root element. */\n this._nativeInteractionsEnabled = true;\n /** Elements that can be used to drag the draggable item. */\n this._handles = [];\n /** Registered handles that are currently disabled. */\n this._disabledHandles = new Set();\n /** Layout direction of the item. */\n this._direction = 'ltr';\n /**\n * Amount of milliseconds to wait after the user has put their\n * pointer down before starting to drag the element.\n */\n this.dragStartDelay = 0;\n this._disabled = false;\n /** Emits as the drag sequence is being prepared. */\n this.beforeStarted = new Subject();\n /** Emits when the user starts dragging the item. */\n this.started = new Subject();\n /** Emits when the user has released a drag item, before any animations have started. */\n this.released = new Subject();\n /** Emits when the user stops dragging an item in the container. */\n this.ended = new Subject();\n /** Emits when the user has moved the item into a new container. */\n this.entered = new Subject();\n /** Emits when the user removes the item its container by dragging it into another container. */\n this.exited = new Subject();\n /** Emits when the user drops the item inside a container. */\n this.dropped = new Subject();\n /**\n * Emits as the user is dragging the item. Use with caution,\n * because this event will fire for every pixel that the user has dragged.\n */\n this.moved = this._moveEvents;\n /** Handler for the `mousedown`/`touchstart` events. */\n this._pointerDown = (event) => {\n this.beforeStarted.next();\n // Delegate the event based on whether it started from a handle or the element itself.\n if (this._handles.length) {\n const targetHandle = this._getTargetHandle(event);\n if (targetHandle && !this._disabledHandles.has(targetHandle) && !this.disabled) {\n this._initializeDragSequence(targetHandle, event);\n }\n }\n else if (!this.disabled) {\n this._initializeDragSequence(this._rootElement, event);\n }\n };\n /** Handler that is invoked when the user moves their pointer after they've initiated a drag. */\n this._pointerMove = (event) => {\n const pointerPosition = this._getPointerPositionOnPage(event);\n if (!this._hasStartedDragging) {\n const distanceX = Math.abs(pointerPosition.x - this._pickupPositionOnPage.x);\n const distanceY = Math.abs(pointerPosition.y - this._pickupPositionOnPage.y);\n const isOverThreshold = distanceX + distanceY >= this._config.dragStartThreshold;\n // Only start dragging after the user has moved more than the minimum distance in either\n // direction. Note that this is preferrable over doing something like `skip(minimumDistance)`\n // in the `pointerMove` subscription, because we're not guaranteed to have one move event\n // per pixel of movement (e.g. if the user moves their pointer quickly).\n if (isOverThreshold) {\n const isDelayElapsed = Date.now() >= this._dragStartTime + this._getDragStartDelay(event);\n const container = this._dropContainer;\n if (!isDelayElapsed) {\n this._endDragSequence(event);\n return;\n }\n // Prevent other drag sequences from starting while something in the container is still\n // being dragged. This can happen while we're waiting for the drop animation to finish\n // and can cause errors, because some elements might still be moving around.\n if (!container || (!container.isDragging() && !container.isReceiving())) {\n // Prevent the default action as soon as the dragging sequence is considered as\n // \"started\" since waiting for the next event can allow the device to begin scrolling.\n event.preventDefault();\n this._hasStartedDragging = true;\n this._ngZone.run(() => this._startDragSequence(event));\n }\n }\n return;\n }\n // We prevent the default action down here so that we know that dragging has started. This is\n // important for touch devices where doing this too early can unnecessarily block scrolling,\n // if there's a dragging delay.\n event.preventDefault();\n const constrainedPointerPosition = this._getConstrainedPointerPosition(pointerPosition);\n this._hasMoved = true;\n this._lastKnownPointerPosition = pointerPosition;\n this._updatePointerDirectionDelta(constrainedPointerPosition);\n if (this._dropContainer) {\n this._updateActiveDropContainer(constrainedPointerPosition, pointerPosition);\n }\n else {\n // If there's a position constraint function, we want the element's top/left to be at the\n // specific position on the page. Use the initial position as a reference if that's the case.\n const offset = this.constrainPosition ? this._initialClientRect : this._pickupPositionOnPage;\n const activeTransform = this._activeTransform;\n activeTransform.x = constrainedPointerPosition.x - offset.x + this._passiveTransform.x;\n activeTransform.y = constrainedPointerPosition.y - offset.y + this._passiveTransform.y;\n this._applyRootElementTransform(activeTransform.x, activeTransform.y);\n }\n // Since this event gets fired for every pixel while dragging, we only\n // want to fire it if the consumer opted into it. Also we have to\n // re-enter the zone because we run all of the events on the outside.\n if (this._moveEvents.observers.length) {\n this._ngZone.run(() => {\n this._moveEvents.next({\n source: this,\n pointerPosition: constrainedPointerPosition,\n event,\n distance: this._getDragDistance(constrainedPointerPosition),\n delta: this._pointerDirectionDelta,\n });\n });\n }\n };\n /** Handler that is invoked when the user lifts their pointer up, after initiating a drag. */\n this._pointerUp = (event) => {\n this._endDragSequence(event);\n };\n /** Handles a native `dragstart` event. */\n this._nativeDragStart = (event) => {\n if (this._handles.length) {\n const targetHandle = this._getTargetHandle(event);\n if (targetHandle && !this._disabledHandles.has(targetHandle) && !this.disabled) {\n event.preventDefault();\n }\n }\n else if (!this.disabled) {\n // Usually this isn't necessary since the we prevent the default action in `pointerDown`,\n // but some cases like dragging of links can slip through (see #24403).\n event.preventDefault();\n }\n };\n this.withRootElement(element).withParent(_config.parentDragRef || null);\n this._parentPositions = new ParentPositionTracker(_document);\n _dragDropRegistry.registerDragItem(this);\n }\n /** Whether starting to drag this element is disabled. */\n get disabled() {\n return this._disabled || !!(this._dropContainer && this._dropContainer.disabled);\n }\n set disabled(value) {\n const newValue = coerceBooleanProperty(value);\n if (newValue !== this._disabled) {\n this._disabled = newValue;\n this._toggleNativeDragInteractions();\n this._handles.forEach(handle => toggleNativeDragInteractions(handle, newValue));\n }\n }\n /**\n * Returns the element that is being used as a placeholder\n * while the current element is being dragged.\n */\n getPlaceholderElement() {\n return this._placeholder;\n }\n /** Returns the root draggable element. */\n getRootElement() {\n return this._rootElement;\n }\n /**\n * Gets the currently-visible element that represents the drag item.\n * While dragging this is the placeholder, otherwise it's the root element.\n */\n getVisibleElement() {\n return this.isDragging() ? this.getPlaceholderElement() : this.getRootElement();\n }\n /** Registers the handles that can be used to drag the element. */\n withHandles(handles) {\n this._handles = handles.map(handle => coerceElement(handle));\n this._handles.forEach(handle => toggleNativeDragInteractions(handle, this.disabled));\n this._toggleNativeDragInteractions();\n // Delete any lingering disabled handles that may have been destroyed. Note that we re-create\n // the set, rather than iterate over it and filter out the destroyed handles, because while\n // the ES spec allows for sets to be modified while they're being iterated over, some polyfills\n // use an array internally which may throw an error.\n const disabledHandles = new Set();\n this._disabledHandles.forEach(handle => {\n if (this._handles.indexOf(handle) > -1) {\n disabledHandles.add(handle);\n }\n });\n this._disabledHandles = disabledHandles;\n return this;\n }\n /**\n * Registers the template that should be used for the drag preview.\n * @param template Template that from which to stamp out the preview.\n */\n withPreviewTemplate(template) {\n this._previewTemplate = template;\n return this;\n }\n /**\n * Registers the template that should be used for the drag placeholder.\n * @param template Template that from which to stamp out the placeholder.\n */\n withPlaceholderTemplate(template) {\n this._placeholderTemplate = template;\n return this;\n }\n /**\n * Sets an alternate drag root element. The root element is the element that will be moved as\n * the user is dragging. Passing an alternate root element is useful when trying to enable\n * dragging on an element that you might not have access to.\n */\n withRootElement(rootElement) {\n const element = coerceElement(rootElement);\n if (element !== this._rootElement) {\n if (this._rootElement) {\n this._removeRootElementListeners(this._rootElement);\n }\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('mousedown', this._pointerDown, activeEventListenerOptions);\n element.addEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);\n element.addEventListener('dragstart', this._nativeDragStart, activeEventListenerOptions);\n });\n this._initialTransform = undefined;\n this._rootElement = element;\n }\n if (typeof SVGElement !== 'undefined' && this._rootElement instanceof SVGElement) {\n this._ownerSVGElement = this._rootElement.ownerSVGElement;\n }\n return this;\n }\n /**\n * Element to which the draggable's position will be constrained.\n */\n withBoundaryElement(boundaryElement) {\n this._boundaryElement = boundaryElement ? coerceElement(boundaryElement) : null;\n this._resizeSubscription.unsubscribe();\n if (boundaryElement) {\n this._resizeSubscription = this._viewportRuler\n .change(10)\n .subscribe(() => this._containInsideBoundaryOnResize());\n }\n return this;\n }\n /** Sets the parent ref that the ref is nested in. */\n withParent(parent) {\n this._parentDragRef = parent;\n return this;\n }\n /** Removes the dragging functionality from the DOM element. */\n dispose() {\n this._removeRootElementListeners(this._rootElement);\n // Do this check before removing from the registry since it'll\n // stop being considered as dragged once it is removed.\n if (this.isDragging()) {\n // Since we move out the element to the end of the body while it's being\n // dragged, we have to make sure that it's removed if it gets destroyed.\n this._rootElement?.remove();\n }\n this._anchor?.remove();\n this._destroyPreview();\n this._destroyPlaceholder();\n this._dragDropRegistry.removeDragItem(this);\n this._removeSubscriptions();\n this.beforeStarted.complete();\n this.started.complete();\n this.released.complete();\n this.ended.complete();\n this.entered.complete();\n this.exited.complete();\n this.dropped.complete();\n this._moveEvents.complete();\n this._handles = [];\n this._disabledHandles.clear();\n this._dropContainer = undefined;\n this._resizeSubscription.unsubscribe();\n this._parentPositions.clear();\n this._boundaryElement =\n this._rootElement =\n this._ownerSVGElement =\n this._placeholderTemplate =\n this._previewTemplate =\n this._anchor =\n this._parentDragRef =\n null;\n }\n /** Checks whether the element is currently being dragged. */\n isDragging() {\n return this._hasStartedDragging && this._dragDropRegistry.isDragging(this);\n }\n /** Resets a standalone drag item to its initial position. */\n reset() {\n this._rootElement.style.transform = this._initialTransform || '';\n this._activeTransform = { x: 0, y: 0 };\n this._passiveTransform = { x: 0, y: 0 };\n }\n /**\n * Sets a handle as disabled. While a handle is disabled, it'll capture and interrupt dragging.\n * @param handle Handle element that should be disabled.\n */\n disableHandle(handle) {\n if (!this._disabledHandles.has(handle) && this._handles.indexOf(handle) > -1) {\n this._disabledHandles.add(handle);\n toggleNativeDragInteractions(handle, true);\n }\n }\n /**\n * Enables a handle, if it has been disabled.\n * @param handle Handle element to be enabled.\n */\n enableHandle(handle) {\n if (this._disabledHandles.has(handle)) {\n this._disabledHandles.delete(handle);\n toggleNativeDragInteractions(handle, this.disabled);\n }\n }\n /** Sets the layout direction of the draggable item. */\n withDirection(direction) {\n this._direction = direction;\n return this;\n }\n /** Sets the container that the item is part of. */\n _withDropContainer(container) {\n this._dropContainer = container;\n }\n /**\n * Gets the current position in pixels the draggable outside of a drop container.\n */\n getFreeDragPosition() {\n const position = this.isDragging() ? this._activeTransform : this._passiveTransform;\n return { x: position.x, y: position.y };\n }\n /**\n * Sets the current position in pixels the draggable outside of a drop container.\n * @param value New position to be set.\n */\n setFreeDragPosition(value) {\n this._activeTransform = { x: 0, y: 0 };\n this._passiveTransform.x = value.x;\n this._passiveTransform.y = value.y;\n if (!this._dropContainer) {\n this._applyRootElementTransform(value.x, value.y);\n }\n return this;\n }\n /**\n * Sets the container into which to insert the preview element.\n * @param value Container into which to insert the preview.\n */\n withPreviewContainer(value) {\n this._previewContainer = value;\n return this;\n }\n /** Updates the item's sort order based on the last-known pointer position. */\n _sortFromLastPointerPosition() {\n const position = this._lastKnownPointerPosition;\n if (position && this._dropContainer) {\n this._updateActiveDropContainer(this._getConstrainedPointerPosition(position), position);\n }\n }\n /** Unsubscribes from the global subscriptions. */\n _removeSubscriptions() {\n this._pointerMoveSubscription.unsubscribe();\n this._pointerUpSubscription.unsubscribe();\n this._scrollSubscription.unsubscribe();\n }\n /** Destroys the preview element and its ViewRef. */\n _destroyPreview() {\n this._preview?.remove();\n this._previewRef?.destroy();\n this._preview = this._previewRef = null;\n }\n /** Destroys the placeholder element and its ViewRef. */\n _destroyPlaceholder() {\n this._placeholder?.remove();\n this._placeholderRef?.destroy();\n this._placeholder = this._placeholderRef = null;\n }\n /**\n * Clears subscriptions and stops the dragging sequence.\n * @param event Browser event object that ended the sequence.\n */\n _endDragSequence(event) {\n // Note that here we use `isDragging` from the service, rather than from `this`.\n // The difference is that the one from the service reflects whether a dragging sequence\n // has been initiated, whereas the one on `this` includes whether the user has passed\n // the minimum dragging threshold.\n if (!this._dragDropRegistry.isDragging(this)) {\n return;\n }\n this._removeSubscriptions();\n this._dragDropRegistry.stopDragging(this);\n this._toggleNativeDragInteractions();\n if (this._handles) {\n this._rootElement.style.webkitTapHighlightColor =\n this._rootElementTapHighlight;\n }\n if (!this._hasStartedDragging) {\n return;\n }\n this.released.next({ source: this, event });\n if (this._dropContainer) {\n // Stop scrolling immediately, instead of waiting for the animation to finish.\n this._dropContainer._stopScrolling();\n this._animatePreviewToPlaceholder().then(() => {\n this._cleanupDragArtifacts(event);\n this._cleanupCachedDimensions();\n this._dragDropRegistry.stopDragging(this);\n });\n }\n else {\n // Convert the active transform into a passive one. This means that next time\n // the user starts dragging the item, its position will be calculated relatively\n // to the new passive transform.\n this._passiveTransform.x = this._activeTransform.x;\n const pointerPosition = this._getPointerPositionOnPage(event);\n this._passiveTransform.y = this._activeTransform.y;\n this._ngZone.run(() => {\n this.ended.next({\n source: this,\n distance: this._getDragDistance(pointerPosition),\n dropPoint: pointerPosition,\n event,\n });\n });\n this._cleanupCachedDimensions();\n this._dragDropRegistry.stopDragging(this);\n }\n }\n /** Starts the dragging sequence. */\n _startDragSequence(event) {\n if (isTouchEvent(event)) {\n this._lastTouchEventTime = Date.now();\n }\n this._toggleNativeDragInteractions();\n const dropContainer = this._dropContainer;\n if (dropContainer) {\n const element = this._rootElement;\n const parent = element.parentNode;\n const placeholder = (this._placeholder = this._createPlaceholderElement());\n const anchor = (this._anchor = this._anchor || this._document.createComment(''));\n // Needs to happen before the root element is moved.\n const shadowRoot = this._getShadowRoot();\n // Insert an anchor node so that we can restore the element's position in the DOM.\n parent.insertBefore(anchor, element);\n // There's no risk of transforms stacking when inside a drop container so\n // we can keep the initial transform up to date any time dragging starts.\n this._initialTransform = element.style.transform || '';\n // Create the preview after the initial transform has\n // been cached, because it can be affected by the transform.\n this._preview = this._createPreviewElement();\n // We move the element out at the end of the body and we make it hidden, because keeping it in\n // place will throw off the consumer's `:last-child` selectors. We can't remove the element\n // from the DOM completely, because iOS will stop firing all subsequent events in the chain.\n toggleVisibility(element, false, dragImportantProperties);\n this._document.body.appendChild(parent.replaceChild(placeholder, element));\n this._getPreviewInsertionPoint(parent, shadowRoot).appendChild(this._preview);\n this.started.next({ source: this, event }); // Emit before notifying the container.\n dropContainer.start();\n this._initialContainer = dropContainer;\n this._initialIndex = dropContainer.getItemIndex(this);\n }\n else {\n this.started.next({ source: this, event });\n this._initialContainer = this._initialIndex = undefined;\n }\n // Important to run after we've called `start` on the parent container\n // so that it has had time to resolve its scrollable parents.\n this._parentPositions.cache(dropContainer ? dropContainer.getScrollableParents() : []);\n }\n /**\n * Sets up the different variables and subscriptions\n * that will be necessary for the dragging sequence.\n * @param referenceElement Element that started the drag sequence.\n * @param event Browser event object that started the sequence.\n */\n _initializeDragSequence(referenceElement, event) {\n // Stop propagation if the item is inside another\n // draggable so we don't start multiple drag sequences.\n if (this._parentDragRef) {\n event.stopPropagation();\n }\n const isDragging = this.isDragging();\n const isTouchSequence = isTouchEvent(event);\n const isAuxiliaryMouseButton = !isTouchSequence && event.button !== 0;\n const rootElement = this._rootElement;\n const target = _getEventTarget(event);\n const isSyntheticEvent = !isTouchSequence &&\n this._lastTouchEventTime &&\n this._lastTouchEventTime + MOUSE_EVENT_IGNORE_TIME > Date.now();\n const isFakeEvent = isTouchSequence\n ? isFakeTouchstartFromScreenReader(event)\n : isFakeMousedownFromScreenReader(event);\n // If the event started from an element with the native HTML drag&drop, it'll interfere\n // with our own dragging (e.g. `img` tags do it by default). Prevent the default action\n // to stop it from happening. Note that preventing on `dragstart` also seems to work, but\n // it's flaky and it fails if the user drags it away quickly. Also note that we only want\n // to do this for `mousedown` since doing the same for `touchstart` will stop any `click`\n // events from firing on touch devices.\n if (target && target.draggable && event.type === 'mousedown') {\n event.preventDefault();\n }\n // Abort if the user is already dragging or is using a mouse button other than the primary one.\n if (isDragging || isAuxiliaryMouseButton || isSyntheticEvent || isFakeEvent) {\n return;\n }\n // If we've got handles, we need to disable the tap highlight on the entire root element,\n // otherwise iOS will still add it, even though all the drag interactions on the handle\n // are disabled.\n if (this._handles.length) {\n const rootStyles = rootElement.style;\n this._rootElementTapHighlight = rootStyles.webkitTapHighlightColor || '';\n rootStyles.webkitTapHighlightColor = 'transparent';\n }\n this._hasStartedDragging = this._hasMoved = false;\n // Avoid multiple subscriptions and memory leaks when multi touch\n // (isDragging check above isn't enough because of possible temporal and/or dimensional delays)\n this._removeSubscriptions();\n this._initialClientRect = this._rootElement.getBoundingClientRect();\n this._pointerMoveSubscription = this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);\n this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(this._pointerUp);\n this._scrollSubscription = this._dragDropRegistry\n .scrolled(this._getShadowRoot())\n .subscribe(scrollEvent => this._updateOnScroll(scrollEvent));\n if (this._boundaryElement) {\n this._boundaryRect = getMutableClientRect(this._boundaryElement);\n }\n // If we have a custom preview we can't know ahead of time how large it'll be so we position\n // it next to the cursor. The exception is when the consumer has opted into making the preview\n // the same size as the root element, in which case we do know the size.\n const previewTemplate = this._previewTemplate;\n this._pickupPositionInElement =\n previewTemplate && previewTemplate.template && !previewTemplate.matchSize\n ? { x: 0, y: 0 }\n : this._getPointerPositionInElement(this._initialClientRect, referenceElement, event);\n const pointerPosition = (this._pickupPositionOnPage =\n this._lastKnownPointerPosition =\n this._getPointerPositionOnPage(event));\n this._pointerDirectionDelta = { x: 0, y: 0 };\n this._pointerPositionAtLastDirectionChange = { x: pointerPosition.x, y: pointerPosition.y };\n this._dragStartTime = Date.now();\n this._dragDropRegistry.startDragging(this, event);\n }\n /** Cleans up the DOM artifacts that were added to facilitate the element being dragged. */\n _cleanupDragArtifacts(event) {\n // Restore the element's visibility and insert it at its old position in the DOM.\n // It's important that we maintain the position, because moving the element around in the DOM\n // can throw off `NgFor` which does smart diffing and re-creates elements only when necessary,\n // while moving the existing elements in all other cases.\n toggleVisibility(this._rootElement, true, dragImportantProperties);\n this._anchor.parentNode.replaceChild(this._rootElement, this._anchor);\n this._destroyPreview();\n this._destroyPlaceholder();\n this._initialClientRect =\n this._boundaryRect =\n this._previewRect =\n this._initialTransform =\n undefined;\n // Re-enter the NgZone since we bound `document` events on the outside.\n this._ngZone.run(() => {\n const container = this._dropContainer;\n const currentIndex = container.getItemIndex(this);\n const pointerPosition = this._getPointerPositionOnPage(event);\n const distance = this._getDragDistance(pointerPosition);\n const isPointerOverContainer = container._isOverContainer(pointerPosition.x, pointerPosition.y);\n this.ended.next({ source: this, distance, dropPoint: pointerPosition, event });\n this.dropped.next({\n item: this,\n currentIndex,\n previousIndex: this._initialIndex,\n container: container,\n previousContainer: this._initialContainer,\n isPointerOverContainer,\n distance,\n dropPoint: pointerPosition,\n event,\n });\n container.drop(this, currentIndex, this._initialIndex, this._initialContainer, isPointerOverContainer, distance, pointerPosition);\n this._dropContainer = this._initialContainer;\n });\n }\n /**\n * Updates the item's position in its drop container, or moves it\n * into a new one, depending on its current drag position.\n */\n _updateActiveDropContainer({ x, y }, { x: rawX, y: rawY }) {\n // Drop container that draggable has been moved into.\n let newContainer = this._initialContainer._getSiblingContainerFromPosition(this, x, y);\n // If we couldn't find a new container to move the item into, and the item has left its\n // initial container, check whether the it's over the initial container. This handles the\n // case where two containers are connected one way and the user tries to undo dragging an\n // item into a new container.\n if (!newContainer &&\n this._dropContainer !== this._initialContainer &&\n this._initialContainer._isOverContainer(x, y)) {\n newContainer = this._initialContainer;\n }\n if (newContainer && newContainer !== this._dropContainer) {\n this._ngZone.run(() => {\n // Notify the old container that the item has left.\n this.exited.next({ item: this, container: this._dropContainer });\n this._dropContainer.exit(this);\n // Notify the new container that the item has entered.\n this._dropContainer = newContainer;\n this._dropContainer.enter(this, x, y, newContainer === this._initialContainer &&\n // If we're re-entering the initial container and sorting is disabled,\n // put item the into its starting index to begin with.\n newContainer.sortingDisabled\n ? this._initialIndex\n : undefined);\n this.entered.next({\n item: this,\n container: newContainer,\n currentIndex: newContainer.getItemIndex(this),\n });\n });\n }\n // Dragging may have been interrupted as a result of the events above.\n if (this.isDragging()) {\n this._dropContainer._startScrollingIfNecessary(rawX, rawY);\n this._dropContainer._sortItem(this, x, y, this._pointerDirectionDelta);\n if (this.constrainPosition) {\n this._applyPreviewTransform(x, y);\n }\n else {\n this._applyPreviewTransform(x - this._pickupPositionInElement.x, y - this._pickupPositionInElement.y);\n }\n }\n }\n /**\n * Creates the element that will be rendered next to the user's pointer\n * and will be used as a preview of the element that is being dragged.\n */\n _createPreviewElement() {\n const previewConfig = this._previewTemplate;\n const previewClass = this.previewClass;\n const previewTemplate = previewConfig ? previewConfig.template : null;\n let preview;\n if (previewTemplate && previewConfig) {\n // Measure the element before we've inserted the preview\n // since the insertion could throw off the measurement.\n const rootRect = previewConfig.matchSize ? this._initialClientRect : null;\n const viewRef = previewConfig.viewContainer.createEmbeddedView(previewTemplate, previewConfig.context);\n viewRef.detectChanges();\n preview = getRootNode(viewRef, this._document);\n this._previewRef = viewRef;\n if (previewConfig.matchSize) {\n matchElementSize(preview, rootRect);\n }\n else {\n preview.style.transform = getTransform(this._pickupPositionOnPage.x, this._pickupPositionOnPage.y);\n }\n }\n else {\n preview = deepCloneNode(this._rootElement);\n matchElementSize(preview, this._initialClientRect);\n if (this._initialTransform) {\n preview.style.transform = this._initialTransform;\n }\n }\n extendStyles(preview.style, {\n // It's important that we disable the pointer events on the preview, because\n // it can throw off the `document.elementFromPoint` calls in the `CdkDropList`.\n 'pointer-events': 'none',\n // We have to reset the margin, because it can throw off positioning relative to the viewport.\n 'margin': '0',\n 'position': 'fixed',\n 'top': '0',\n 'left': '0',\n 'z-index': `${this._config.zIndex || 1000}`,\n }, dragImportantProperties);\n toggleNativeDragInteractions(preview, false);\n preview.classList.add('cdk-drag-preview');\n preview.setAttribute('dir', this._direction);\n if (previewClass) {\n if (Array.isArray(previewClass)) {\n previewClass.forEach(className => preview.classList.add(className));\n }\n else {\n preview.classList.add(previewClass);\n }\n }\n return preview;\n }\n /**\n * Animates the preview element from its current position to the location of the drop placeholder.\n * @returns Promise that resolves when the animation completes.\n */\n _animatePreviewToPlaceholder() {\n // If the user hasn't moved yet, the transitionend event won't fire.\n if (!this._hasMoved) {\n return Promise.resolve();\n }\n const placeholderRect = this._placeholder.getBoundingClientRect();\n // Apply the class that adds a transition to the preview.\n this._preview.classList.add('cdk-drag-animating');\n // Move the preview to the placeholder position.\n this._applyPreviewTransform(placeholderRect.left, placeholderRect.top);\n // If the element doesn't have a `transition`, the `transitionend` event won't fire. Since\n // we need to trigger a style recalculation in order for the `cdk-drag-animating` class to\n // apply its style, we take advantage of the available info to figure out whether we need to\n // bind the event in the first place.\n const duration = getTransformTransitionDurationInMs(this._preview);\n if (duration === 0) {\n return Promise.resolve();\n }\n return this._ngZone.runOutsideAngular(() => {\n return new Promise(resolve => {\n const handler = ((event) => {\n if (!event ||\n (_getEventTarget(event) === this._preview && event.propertyName === 'transform')) {\n this._preview?.removeEventListener('transitionend', handler);\n resolve();\n clearTimeout(timeout);\n }\n });\n // If a transition is short enough, the browser might not fire the `transitionend` event.\n // Since we know how long it's supposed to take, add a timeout with a 50% buffer that'll\n // fire if the transition hasn't completed when it was supposed to.\n const timeout = setTimeout(handler, duration * 1.5);\n this._preview.addEventListener('transitionend', handler);\n });\n });\n }\n /** Creates an element that will be shown instead of the current element while dragging. */\n _createPlaceholderElement() {\n const placeholderConfig = this._placeholderTemplate;\n const placeholderTemplate = placeholderConfig ? placeholderConfig.template : null;\n let placeholder;\n if (placeholderTemplate) {\n this._placeholderRef = placeholderConfig.viewContainer.createEmbeddedView(placeholderTemplate, placeholderConfig.context);\n this._placeholderRef.detectChanges();\n placeholder = getRootNode(this._placeholderRef, this._document);\n }\n else {\n placeholder = deepCloneNode(this._rootElement);\n }\n // Stop pointer events on the preview so the user can't\n // interact with it while the preview is animating.\n placeholder.style.pointerEvents = 'none';\n placeholder.classList.add('cdk-drag-placeholder');\n return placeholder;\n }\n /**\n * Figures out the coordinates at which an element was picked up.\n * @param referenceElement Element that initiated the dragging.\n * @param event Event that initiated the dragging.\n */\n _getPointerPositionInElement(elementRect, referenceElement, event) {\n const handleElement = referenceElement === this._rootElement ? null : referenceElement;\n const referenceRect = handleElement ? handleElement.getBoundingClientRect() : elementRect;\n const point = isTouchEvent(event) ? event.targetTouches[0] : event;\n const scrollPosition = this._getViewportScrollPosition();\n const x = point.pageX - referenceRect.left - scrollPosition.left;\n const y = point.pageY - referenceRect.top - scrollPosition.top;\n return {\n x: referenceRect.left - elementRect.left + x,\n y: referenceRect.top - elementRect.top + y,\n };\n }\n /** Determines the point of the page that was touched by the user. */\n _getPointerPositionOnPage(event) {\n const scrollPosition = this._getViewportScrollPosition();\n const point = isTouchEvent(event)\n ? // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.\n // Also note that on real devices we're guaranteed for either `touches` or `changedTouches`\n // to have a value, but Firefox in device emulation mode has a bug where both can be empty\n // for `touchstart` and `touchend` so we fall back to a dummy object in order to avoid\n // throwing an error. The value returned here will be incorrect, but since this only\n // breaks inside a developer tool and the value is only used for secondary information,\n // we can get away with it. See https://bugzilla.mozilla.org/show_bug.cgi?id=1615824.\n event.touches[0] || event.changedTouches[0] || { pageX: 0, pageY: 0 }\n : event;\n const x = point.pageX - scrollPosition.left;\n const y = point.pageY - scrollPosition.top;\n // if dragging SVG element, try to convert from the screen coordinate system to the SVG\n // coordinate system\n if (this._ownerSVGElement) {\n const svgMatrix = this._ownerSVGElement.getScreenCTM();\n if (svgMatrix) {\n const svgPoint = this._ownerSVGElement.createSVGPoint();\n svgPoint.x = x;\n svgPoint.y = y;\n return svgPoint.matrixTransform(svgMatrix.inverse());\n }\n }\n return { x, y };\n }\n /** Gets the pointer position on the page, accounting for any position constraints. */\n _getConstrainedPointerPosition(point) {\n const dropContainerLock = this._dropContainer ? this._dropContainer.lockAxis : null;\n let { x, y } = this.constrainPosition\n ? this.constrainPosition(point, this, this._initialClientRect)\n : point;\n if (this.lockAxis === 'x' || dropContainerLock === 'x') {\n y = this._pickupPositionOnPage.y;\n }\n else if (this.lockAxis === 'y' || dropContainerLock === 'y') {\n x = this._pickupPositionOnPage.x;\n }\n if (this._boundaryRect) {\n const { x: pickupX, y: pickupY } = this._pickupPositionInElement;\n const boundaryRect = this._boundaryRect;\n const { width: previewWidth, height: previewHeight } = this._getPreviewRect();\n const minY = boundaryRect.top + pickupY;\n const maxY = boundaryRect.bottom - (previewHeight - pickupY);\n const minX = boundaryRect.left + pickupX;\n const maxX = boundaryRect.right - (previewWidth - pickupX);\n x = clamp$1(x, minX, maxX);\n y = clamp$1(y, minY, maxY);\n }\n return { x, y };\n }\n /** Updates the current drag delta, based on the user's current pointer position on the page. */\n _updatePointerDirectionDelta(pointerPositionOnPage) {\n const { x, y } = pointerPositionOnPage;\n const delta = this._pointerDirectionDelta;\n const positionSinceLastChange = this._pointerPositionAtLastDirectionChange;\n // Amount of pixels the user has dragged since the last time the direction changed.\n const changeX = Math.abs(x - positionSinceLastChange.x);\n const changeY = Math.abs(y - positionSinceLastChange.y);\n // Because we handle pointer events on a per-pixel basis, we don't want the delta\n // to change for every pixel, otherwise anything that depends on it can look erratic.\n // To make the delta more consistent, we track how much the user has moved since the last\n // delta change and we only update it after it has reached a certain threshold.\n if (changeX > this._config.pointerDirectionChangeThreshold) {\n delta.x = x > positionSinceLastChange.x ? 1 : -1;\n positionSinceLastChange.x = x;\n }\n if (changeY > this._config.pointerDirectionChangeThreshold) {\n delta.y = y > positionSinceLastChange.y ? 1 : -1;\n positionSinceLastChange.y = y;\n }\n return delta;\n }\n /** Toggles the native drag interactions, based on how many handles are registered. */\n _toggleNativeDragInteractions() {\n if (!this._rootElement || !this._handles) {\n return;\n }\n const shouldEnable = this._handles.length > 0 || !this.isDragging();\n if (shouldEnable !== this._nativeInteractionsEnabled) {\n this._nativeInteractionsEnabled = shouldEnable;\n toggleNativeDragInteractions(this._rootElement, shouldEnable);\n }\n }\n /** Removes the manually-added event listeners from the root element. */\n _removeRootElementListeners(element) {\n element.removeEventListener('mousedown', this._pointerDown, activeEventListenerOptions);\n element.removeEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);\n element.removeEventListener('dragstart', this._nativeDragStart, activeEventListenerOptions);\n }\n /**\n * Applies a `transform` to the root element, taking into account any existing transforms on it.\n * @param x New transform value along the X axis.\n * @param y New transform value along the Y axis.\n */\n _applyRootElementTransform(x, y) {\n const transform = getTransform(x, y);\n const styles = this._rootElement.style;\n // Cache the previous transform amount only after the first drag sequence, because\n // we don't want our own transforms to stack on top of each other.\n // Should be excluded none because none + translate3d(x, y, x) is invalid css\n if (this._initialTransform == null) {\n this._initialTransform =\n styles.transform && styles.transform != 'none' ? styles.transform : '';\n }\n // Preserve the previous `transform` value, if there was one. Note that we apply our own\n // transform before the user's, because things like rotation can affect which direction\n // the element will be translated towards.\n styles.transform = combineTransforms(transform, this._initialTransform);\n }\n /**\n * Applies a `transform` to the preview, taking into account any existing transforms on it.\n * @param x New transform value along the X axis.\n * @param y New transform value along the Y axis.\n */\n _applyPreviewTransform(x, y) {\n // Only apply the initial transform if the preview is a clone of the original element, otherwise\n // it could be completely different and the transform might not make sense anymore.\n const initialTransform = this._previewTemplate?.template ? undefined : this._initialTransform;\n const transform = getTransform(x, y);\n this._preview.style.transform = combineTransforms(transform, initialTransform);\n }\n /**\n * Gets the distance that the user has dragged during the current drag sequence.\n * @param currentPosition Current position of the user's pointer.\n */\n _getDragDistance(currentPosition) {\n const pickupPosition = this._pickupPositionOnPage;\n if (pickupPosition) {\n return { x: currentPosition.x - pickupPosition.x, y: currentPosition.y - pickupPosition.y };\n }\n return { x: 0, y: 0 };\n }\n /** Cleans up any cached element dimensions that we don't need after dragging has stopped. */\n _cleanupCachedDimensions() {\n this._boundaryRect = this._previewRect = undefined;\n this._parentPositions.clear();\n }\n /**\n * Checks whether the element is still inside its boundary after the viewport has been resized.\n * If not, the position is adjusted so that the element fits again.\n */\n _containInsideBoundaryOnResize() {\n let { x, y } = this._passiveTransform;\n if ((x === 0 && y === 0) || this.isDragging() || !this._boundaryElement) {\n return;\n }\n // Note: don't use `_clientRectAtStart` here, because we want the latest position.\n const elementRect = this._rootElement.getBoundingClientRect();\n const boundaryRect = this._boundaryElement.getBoundingClientRect();\n // It's possible that the element got hidden away after dragging (e.g. by switching to a\n // different tab). Don't do anything in this case so we don't clear the user's position.\n if ((boundaryRect.width === 0 && boundaryRect.height === 0) ||\n (elementRect.width === 0 && elementRect.height === 0)) {\n return;\n }\n const leftOverflow = boundaryRect.left - elementRect.left;\n const rightOverflow = elementRect.right - boundaryRect.right;\n const topOverflow = boundaryRect.top - elementRect.top;\n const bottomOverflow = elementRect.bottom - boundaryRect.bottom;\n // If the element has become wider than the boundary, we can't\n // do much to make it fit so we just anchor it to the left.\n if (boundaryRect.width > elementRect.width) {\n if (leftOverflow > 0) {\n x += leftOverflow;\n }\n if (rightOverflow > 0) {\n x -= rightOverflow;\n }\n }\n else {\n x = 0;\n }\n // If the element has become taller than the boundary, we can't\n // do much to make it fit so we just anchor it to the top.\n if (boundaryRect.height > elementRect.height) {\n if (topOverflow > 0) {\n y += topOverflow;\n }\n if (bottomOverflow > 0) {\n y -= bottomOverflow;\n }\n }\n else {\n y = 0;\n }\n if (x !== this._passiveTransform.x || y !== this._passiveTransform.y) {\n this.setFreeDragPosition({ y, x });\n }\n }\n /** Gets the drag start delay, based on the event type. */\n _getDragStartDelay(event) {\n const value = this.dragStartDelay;\n if (typeof value === 'number') {\n return value;\n }\n else if (isTouchEvent(event)) {\n return value.touch;\n }\n return value ? value.mouse : 0;\n }\n /** Updates the internal state of the draggable element when scrolling has occurred. */\n _updateOnScroll(event) {\n const scrollDifference = this._parentPositions.handleScroll(event);\n if (scrollDifference) {\n const target = _getEventTarget(event);\n // ClientRect dimensions are based on the scroll position of the page and its parent\n // node so we have to update the cached boundary ClientRect if the user has scrolled.\n if (this._boundaryRect &&\n target !== this._boundaryElement &&\n target.contains(this._boundaryElement)) {\n adjustClientRect(this._boundaryRect, scrollDifference.top, scrollDifference.left);\n }\n this._pickupPositionOnPage.x += scrollDifference.left;\n this._pickupPositionOnPage.y += scrollDifference.top;\n // If we're in free drag mode, we have to update the active transform, because\n // it isn't relative to the viewport like the preview inside a drop list.\n if (!this._dropContainer) {\n this._activeTransform.x -= scrollDifference.left;\n this._activeTransform.y -= scrollDifference.top;\n this._applyRootElementTransform(this._activeTransform.x, this._activeTransform.y);\n }\n }\n }\n /** Gets the scroll position of the viewport. */\n _getViewportScrollPosition() {\n return (this._parentPositions.positions.get(this._document)?.scrollPosition ||\n this._parentPositions.getViewportScrollPosition());\n }\n /**\n * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n * than saving it in property directly on init, because we want to resolve it as late as possible\n * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n */\n _getShadowRoot() {\n if (this._cachedShadowRoot === undefined) {\n this._cachedShadowRoot = _getShadowRoot(this._rootElement);\n }\n return this._cachedShadowRoot;\n }\n /** Gets the element into which the drag preview should be inserted. */\n _getPreviewInsertionPoint(initialParent, shadowRoot) {\n const previewContainer = this._previewContainer || 'global';\n if (previewContainer === 'parent') {\n return initialParent;\n }\n if (previewContainer === 'global') {\n const documentRef = this._document;\n // We can't use the body if the user is in fullscreen mode,\n // because the preview will render under the fullscreen element.\n // TODO(crisbeto): dedupe this with the `FullscreenOverlayContainer` eventually.\n return (shadowRoot ||\n documentRef.fullscreenElement ||\n documentRef.webkitFullscreenElement ||\n documentRef.mozFullScreenElement ||\n documentRef.msFullscreenElement ||\n documentRef.body);\n }\n return coerceElement(previewContainer);\n }\n /** Lazily resolves and returns the dimensions of the preview. */\n _getPreviewRect() {\n // Cache the preview element rect if we haven't cached it already or if\n // we cached it too early before the element dimensions were computed.\n if (!this._previewRect || (!this._previewRect.width && !this._previewRect.height)) {\n this._previewRect = this._preview\n ? this._preview.getBoundingClientRect()\n : this._initialClientRect;\n }\n return this._previewRect;\n }\n /** Gets a handle that is the target of an event. */\n _getTargetHandle(event) {\n return this._handles.find(handle => {\n return event.target && (event.target === handle || handle.contains(event.target));\n });\n }\n}\n/**\n * Gets a 3d `transform` that can be applied to an element.\n * @param x Desired position of the element along the X axis.\n * @param y Desired position of the element along the Y axis.\n */\nfunction getTransform(x, y) {\n // Round the transforms since some browsers will\n // blur the elements for sub-pixel transforms.\n return `translate3d(${Math.round(x)}px, ${Math.round(y)}px, 0)`;\n}\n/** Clamps a value between a minimum and a maximum. */\nfunction clamp$1(value, min, max) {\n return Math.max(min, Math.min(max, value));\n}\n/** Determines whether an event is a touch event. */\nfunction isTouchEvent(event) {\n // This function is called for every pixel that the user has dragged so we need it to be\n // as fast as possible. Since we only bind mouse events and touch events, we can assume\n // that if the event's name starts with `t`, it's a touch event.\n return event.type[0] === 't';\n}\n/**\n * Gets the root HTML element of an embedded view.\n * If the root is not an HTML element it gets wrapped in one.\n */\nfunction getRootNode(viewRef, _document) {\n const rootNodes = viewRef.rootNodes;\n if (rootNodes.length === 1 && rootNodes[0].nodeType === _document.ELEMENT_NODE) {\n return rootNodes[0];\n }\n const wrapper = _document.createElement('div');\n rootNodes.forEach(node => wrapper.appendChild(node));\n return wrapper;\n}\n/**\n * Matches the target element's size to the source's size.\n * @param target Element that needs to be resized.\n * @param sourceRect Dimensions of the source element.\n */\nfunction matchElementSize(target, sourceRect) {\n target.style.width = `${sourceRect.width}px`;\n target.style.height = `${sourceRect.height}px`;\n target.style.transform = getTransform(sourceRect.left, sourceRect.top);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Moves an item one index in an array to another.\n * @param array Array in which to move the item.\n * @param fromIndex Starting index of the item.\n * @param toIndex Index to which the item should be moved.\n */\nfunction moveItemInArray(array, fromIndex, toIndex) {\n const from = clamp(fromIndex, array.length - 1);\n const to = clamp(toIndex, array.length - 1);\n if (from === to) {\n return;\n }\n const target = array[from];\n const delta = to < from ? -1 : 1;\n for (let i = from; i !== to; i += delta) {\n array[i] = array[i + delta];\n }\n array[to] = target;\n}\n/**\n * Moves an item from one array to another.\n * @param currentArray Array from which to transfer the item.\n * @param targetArray Array into which to put the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n */\nfunction transferArrayItem(currentArray, targetArray, currentIndex, targetIndex) {\n const from = clamp(currentIndex, currentArray.length - 1);\n const to = clamp(targetIndex, targetArray.length);\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray.splice(from, 1)[0]);\n }\n}\n/**\n * Copies an item from one array to another, leaving it in its\n * original position in current array.\n * @param currentArray Array from which to copy the item.\n * @param targetArray Array into which is copy the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n *\n */\nfunction copyArrayItem(currentArray, targetArray, currentIndex, targetIndex) {\n const to = clamp(targetIndex, targetArray.length);\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray[currentIndex]);\n }\n}\n/** Clamps a number between zero and a maximum. */\nfunction clamp(value, max) {\n return Math.max(0, Math.min(max, value));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Strategy that only supports sorting along a single axis.\n * Items are reordered using CSS transforms which allows for sorting to be animated.\n * @docs-private\n */\nclass SingleAxisSortStrategy {\n constructor(_element, _dragDropRegistry) {\n this._element = _element;\n this._dragDropRegistry = _dragDropRegistry;\n /** Cache of the dimensions of all the items inside the container. */\n this._itemPositions = [];\n /** Direction in which the list is oriented. */\n this.orientation = 'vertical';\n /**\n * Keeps track of the item that was last swapped with the dragged item, as well as what direction\n * the pointer was moving in when the swap occured and whether the user's pointer continued to\n * overlap with the swapped item after the swapping occurred.\n */\n this._previousSwap = {\n drag: null,\n delta: 0,\n overlaps: false,\n };\n }\n /**\n * To be called when the drag sequence starts.\n * @param items Items that are currently in the list.\n */\n start(items) {\n this.withItems(items);\n }\n /**\n * To be called when an item is being sorted.\n * @param item Item to be sorted.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param pointerDelta Direction in which the pointer is moving along each axis.\n */\n sort(item, pointerX, pointerY, pointerDelta) {\n const siblings = this._itemPositions;\n const newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY, pointerDelta);\n if (newIndex === -1 && siblings.length > 0) {\n return null;\n }\n const isHorizontal = this.orientation === 'horizontal';\n const currentIndex = siblings.findIndex(currentItem => currentItem.drag === item);\n const siblingAtNewPosition = siblings[newIndex];\n const currentPosition = siblings[currentIndex].clientRect;\n const newPosition = siblingAtNewPosition.clientRect;\n const delta = currentIndex > newIndex ? 1 : -1;\n // How many pixels the item's placeholder should be offset.\n const itemOffset = this._getItemOffsetPx(currentPosition, newPosition, delta);\n // How many pixels all the other items should be offset.\n const siblingOffset = this._getSiblingOffsetPx(currentIndex, siblings, delta);\n // Save the previous order of the items before moving the item to its new index.\n // We use this to check whether an item has been moved as a result of the sorting.\n const oldOrder = siblings.slice();\n // Shuffle the array in place.\n moveItemInArray(siblings, currentIndex, newIndex);\n siblings.forEach((sibling, index) => {\n // Don't do anything if the position hasn't changed.\n if (oldOrder[index] === sibling) {\n return;\n }\n const isDraggedItem = sibling.drag === item;\n const offset = isDraggedItem ? itemOffset : siblingOffset;\n const elementToOffset = isDraggedItem\n ? item.getPlaceholderElement()\n : sibling.drag.getRootElement();\n // Update the offset to reflect the new position.\n sibling.offset += offset;\n // Since we're moving the items with a `transform`, we need to adjust their cached\n // client rects to reflect their new position, as well as swap their positions in the cache.\n // Note that we shouldn't use `getBoundingClientRect` here to update the cache, because the\n // elements may be mid-animation which will give us a wrong result.\n if (isHorizontal) {\n // Round the transforms since some browsers will\n // blur the elements, for sub-pixel transforms.\n elementToOffset.style.transform = combineTransforms(`translate3d(${Math.round(sibling.offset)}px, 0, 0)`, sibling.initialTransform);\n adjustClientRect(sibling.clientRect, 0, offset);\n }\n else {\n elementToOffset.style.transform = combineTransforms(`translate3d(0, ${Math.round(sibling.offset)}px, 0)`, sibling.initialTransform);\n adjustClientRect(sibling.clientRect, offset, 0);\n }\n });\n // Note that it's important that we do this after the client rects have been adjusted.\n this._previousSwap.overlaps = isInsideClientRect(newPosition, pointerX, pointerY);\n this._previousSwap.drag = siblingAtNewPosition.drag;\n this._previousSwap.delta = isHorizontal ? pointerDelta.x : pointerDelta.y;\n return { previousIndex: currentIndex, currentIndex: newIndex };\n }\n /**\n * Called when an item is being moved into the container.\n * @param item Item that was moved into the container.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param index Index at which the item entered. If omitted, the container will try to figure it\n * out automatically.\n */\n enter(item, pointerX, pointerY, index) {\n const newIndex = index == null || index < 0\n ? // We use the coordinates of where the item entered the drop\n // zone to figure out at which index it should be inserted.\n this._getItemIndexFromPointerPosition(item, pointerX, pointerY)\n : index;\n const activeDraggables = this._activeDraggables;\n const currentIndex = activeDraggables.indexOf(item);\n const placeholder = item.getPlaceholderElement();\n let newPositionReference = activeDraggables[newIndex];\n // If the item at the new position is the same as the item that is being dragged,\n // it means that we're trying to restore the item to its initial position. In this\n // case we should use the next item from the list as the reference.\n if (newPositionReference === item) {\n newPositionReference = activeDraggables[newIndex + 1];\n }\n // If we didn't find a new position reference, it means that either the item didn't start off\n // in this container, or that the item requested to be inserted at the end of the list.\n if (!newPositionReference &&\n (newIndex == null || newIndex === -1 || newIndex < activeDraggables.length - 1) &&\n this._shouldEnterAsFirstChild(pointerX, pointerY)) {\n newPositionReference = activeDraggables[0];\n }\n // Since the item may be in the `activeDraggables` already (e.g. if the user dragged it\n // into another container and back again), we have to ensure that it isn't duplicated.\n if (currentIndex > -1) {\n activeDraggables.splice(currentIndex, 1);\n }\n // Don't use items that are being dragged as a reference, because\n // their element has been moved down to the bottom of the body.\n if (newPositionReference && !this._dragDropRegistry.isDragging(newPositionReference)) {\n const element = newPositionReference.getRootElement();\n element.parentElement.insertBefore(placeholder, element);\n activeDraggables.splice(newIndex, 0, item);\n }\n else {\n coerceElement(this._element).appendChild(placeholder);\n activeDraggables.push(item);\n }\n // The transform needs to be cleared so it doesn't throw off the measurements.\n placeholder.style.transform = '';\n // Note that usually `start` is called together with `enter` when an item goes into a new\n // container. This will cache item positions, but we need to refresh them since the amount\n // of items has changed.\n this._cacheItemPositions();\n }\n /** Sets the items that are currently part of the list. */\n withItems(items) {\n this._activeDraggables = items.slice();\n this._cacheItemPositions();\n }\n /** Assigns a sort predicate to the strategy. */\n withSortPredicate(predicate) {\n this._sortPredicate = predicate;\n }\n /** Resets the strategy to its initial state before dragging was started. */\n reset() {\n // TODO(crisbeto): may have to wait for the animations to finish.\n this._activeDraggables.forEach(item => {\n const rootElement = item.getRootElement();\n if (rootElement) {\n const initialTransform = this._itemPositions.find(p => p.drag === item)?.initialTransform;\n rootElement.style.transform = initialTransform || '';\n }\n });\n this._itemPositions = [];\n this._activeDraggables = [];\n this._previousSwap.drag = null;\n this._previousSwap.delta = 0;\n this._previousSwap.overlaps = false;\n }\n /**\n * Gets a snapshot of items currently in the list.\n * Can include items that we dragged in from another list.\n */\n getActiveItemsSnapshot() {\n return this._activeDraggables;\n }\n /** Gets the index of a specific item. */\n getItemIndex(item) {\n // Items are sorted always by top/left in the cache, however they flow differently in RTL.\n // The rest of the logic still stands no matter what orientation we're in, however\n // we need to invert the array when determining the index.\n const items = this.orientation === 'horizontal' && this.direction === 'rtl'\n ? this._itemPositions.slice().reverse()\n : this._itemPositions;\n return items.findIndex(currentItem => currentItem.drag === item);\n }\n /** Used to notify the strategy that the scroll position has changed. */\n updateOnScroll(topDifference, leftDifference) {\n // Since we know the amount that the user has scrolled we can shift all of the\n // client rectangles ourselves. This is cheaper than re-measuring everything and\n // we can avoid inconsistent behavior where we might be measuring the element before\n // its position has changed.\n this._itemPositions.forEach(({ clientRect }) => {\n adjustClientRect(clientRect, topDifference, leftDifference);\n });\n // We need two loops for this, because we want all of the cached\n // positions to be up-to-date before we re-sort the item.\n this._itemPositions.forEach(({ drag }) => {\n if (this._dragDropRegistry.isDragging(drag)) {\n // We need to re-sort the item manually, because the pointer move\n // events won't be dispatched while the user is scrolling.\n drag._sortFromLastPointerPosition();\n }\n });\n }\n /** Refreshes the position cache of the items and sibling containers. */\n _cacheItemPositions() {\n const isHorizontal = this.orientation === 'horizontal';\n this._itemPositions = this._activeDraggables\n .map(drag => {\n const elementToMeasure = drag.getVisibleElement();\n return {\n drag,\n offset: 0,\n initialTransform: elementToMeasure.style.transform || '',\n clientRect: getMutableClientRect(elementToMeasure),\n };\n })\n .sort((a, b) => {\n return isHorizontal\n ? a.clientRect.left - b.clientRect.left\n : a.clientRect.top - b.clientRect.top;\n });\n }\n /**\n * Gets the offset in pixels by which the item that is being dragged should be moved.\n * @param currentPosition Current position of the item.\n * @param newPosition Position of the item where the current item should be moved.\n * @param delta Direction in which the user is moving.\n */\n _getItemOffsetPx(currentPosition, newPosition, delta) {\n const isHorizontal = this.orientation === 'horizontal';\n let itemOffset = isHorizontal\n ? newPosition.left - currentPosition.left\n : newPosition.top - currentPosition.top;\n // Account for differences in the item width/height.\n if (delta === -1) {\n itemOffset += isHorizontal\n ? newPosition.width - currentPosition.width\n : newPosition.height - currentPosition.height;\n }\n return itemOffset;\n }\n /**\n * Gets the offset in pixels by which the items that aren't being dragged should be moved.\n * @param currentIndex Index of the item currently being dragged.\n * @param siblings All of the items in the list.\n * @param delta Direction in which the user is moving.\n */\n _getSiblingOffsetPx(currentIndex, siblings, delta) {\n const isHorizontal = this.orientation === 'horizontal';\n const currentPosition = siblings[currentIndex].clientRect;\n const immediateSibling = siblings[currentIndex + delta * -1];\n let siblingOffset = currentPosition[isHorizontal ? 'width' : 'height'] * delta;\n if (immediateSibling) {\n const start = isHorizontal ? 'left' : 'top';\n const end = isHorizontal ? 'right' : 'bottom';\n // Get the spacing between the start of the current item and the end of the one immediately\n // after it in the direction in which the user is dragging, or vice versa. We add it to the\n // offset in order to push the element to where it will be when it's inline and is influenced\n // by the `margin` of its siblings.\n if (delta === -1) {\n siblingOffset -= immediateSibling.clientRect[start] - currentPosition[end];\n }\n else {\n siblingOffset += currentPosition[start] - immediateSibling.clientRect[end];\n }\n }\n return siblingOffset;\n }\n /**\n * Checks if pointer is entering in the first position\n * @param pointerX Position of the user's pointer along the X axis.\n * @param pointerY Position of the user's pointer along the Y axis.\n */\n _shouldEnterAsFirstChild(pointerX, pointerY) {\n if (!this._activeDraggables.length) {\n return false;\n }\n const itemPositions = this._itemPositions;\n const isHorizontal = this.orientation === 'horizontal';\n // `itemPositions` are sorted by position while `activeDraggables` are sorted by child index\n // check if container is using some sort of \"reverse\" ordering (eg: flex-direction: row-reverse)\n const reversed = itemPositions[0].drag !== this._activeDraggables[0];\n if (reversed) {\n const lastItemRect = itemPositions[itemPositions.length - 1].clientRect;\n return isHorizontal ? pointerX >= lastItemRect.right : pointerY >= lastItemRect.bottom;\n }\n else {\n const firstItemRect = itemPositions[0].clientRect;\n return isHorizontal ? pointerX <= firstItemRect.left : pointerY <= firstItemRect.top;\n }\n }\n /**\n * Gets the index of an item in the drop container, based on the position of the user's pointer.\n * @param item Item that is being sorted.\n * @param pointerX Position of the user's pointer along the X axis.\n * @param pointerY Position of the user's pointer along the Y axis.\n * @param delta Direction in which the user is moving their pointer.\n */\n _getItemIndexFromPointerPosition(item, pointerX, pointerY, delta) {\n const isHorizontal = this.orientation === 'horizontal';\n const index = this._itemPositions.findIndex(({ drag, clientRect }) => {\n // Skip the item itself.\n if (drag === item) {\n return false;\n }\n if (delta) {\n const direction = isHorizontal ? delta.x : delta.y;\n // If the user is still hovering over the same item as last time, their cursor hasn't left\n // the item after we made the swap, and they didn't change the direction in which they're\n // dragging, we don't consider it a direction swap.\n if (drag === this._previousSwap.drag &&\n this._previousSwap.overlaps &&\n direction === this._previousSwap.delta) {\n return false;\n }\n }\n return isHorizontal\n ? // Round these down since most browsers report client rects with\n // sub-pixel precision, whereas the pointer coordinates are rounded to pixels.\n pointerX >= Math.floor(clientRect.left) && pointerX < Math.floor(clientRect.right)\n : pointerY >= Math.floor(clientRect.top) && pointerY < Math.floor(clientRect.bottom);\n });\n return index === -1 || !this._sortPredicate(index, item) ? -1 : index;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Proximity, as a ratio to width/height, at which a\n * dragged item will affect the drop container.\n */\nconst DROP_PROXIMITY_THRESHOLD = 0.05;\n/**\n * Proximity, as a ratio to width/height at which to start auto-scrolling the drop list or the\n * viewport. The value comes from trying it out manually until it feels right.\n */\nconst SCROLL_PROXIMITY_THRESHOLD = 0.05;\n/**\n * Reference to a drop list. Used to manipulate or dispose of the container.\n */\nclass DropListRef {\n constructor(element, _dragDropRegistry, _document, _ngZone, _viewportRuler) {\n this._dragDropRegistry = _dragDropRegistry;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n /** Whether starting a dragging sequence from this container is disabled. */\n this.disabled = false;\n /** Whether sorting items within the list is disabled. */\n this.sortingDisabled = false;\n /**\n * Whether auto-scrolling the view when the user\n * moves their pointer close to the edges is disabled.\n */\n this.autoScrollDisabled = false;\n /** Number of pixels to scroll for each frame when auto-scrolling an element. */\n this.autoScrollStep = 2;\n /**\n * Function that is used to determine whether an item\n * is allowed to be moved into a drop container.\n */\n this.enterPredicate = () => true;\n /** Function that is used to determine whether an item can be sorted into a particular index. */\n this.sortPredicate = () => true;\n /** Emits right before dragging has started. */\n this.beforeStarted = new Subject();\n /**\n * Emits when the user has moved a new drag item into this container.\n */\n this.entered = new Subject();\n /**\n * Emits when the user removes an item from the container\n * by dragging it into another container.\n */\n this.exited = new Subject();\n /** Emits when the user drops an item inside the container. */\n this.dropped = new Subject();\n /** Emits as the user is swapping items while actively dragging. */\n this.sorted = new Subject();\n /** Whether an item in the list is being dragged. */\n this._isDragging = false;\n /** Draggable items in the container. */\n this._draggables = [];\n /** Drop lists that are connected to the current one. */\n this._siblings = [];\n /** Connected siblings that currently have a dragged item. */\n this._activeSiblings = new Set();\n /** Subscription to the window being scrolled. */\n this._viewportScrollSubscription = Subscription.EMPTY;\n /** Vertical direction in which the list is currently scrolling. */\n this._verticalScrollDirection = 0 /* AutoScrollVerticalDirection.NONE */;\n /** Horizontal direction in which the list is currently scrolling. */\n this._horizontalScrollDirection = 0 /* AutoScrollHorizontalDirection.NONE */;\n /** Used to signal to the current auto-scroll sequence when to stop. */\n this._stopScrollTimers = new Subject();\n /** Shadow root of the current element. Necessary for `elementFromPoint` to resolve correctly. */\n this._cachedShadowRoot = null;\n /** Starts the interval that'll auto-scroll the element. */\n this._startScrollInterval = () => {\n this._stopScrolling();\n interval(0, animationFrameScheduler)\n .pipe(takeUntil(this._stopScrollTimers))\n .subscribe(() => {\n const node = this._scrollNode;\n const scrollStep = this.autoScrollStep;\n if (this._verticalScrollDirection === 1 /* AutoScrollVerticalDirection.UP */) {\n node.scrollBy(0, -scrollStep);\n }\n else if (this._verticalScrollDirection === 2 /* AutoScrollVerticalDirection.DOWN */) {\n node.scrollBy(0, scrollStep);\n }\n if (this._horizontalScrollDirection === 1 /* AutoScrollHorizontalDirection.LEFT */) {\n node.scrollBy(-scrollStep, 0);\n }\n else if (this._horizontalScrollDirection === 2 /* AutoScrollHorizontalDirection.RIGHT */) {\n node.scrollBy(scrollStep, 0);\n }\n });\n };\n this.element = coerceElement(element);\n this._document = _document;\n this.withScrollableParents([this.element]);\n _dragDropRegistry.registerDropContainer(this);\n this._parentPositions = new ParentPositionTracker(_document);\n this._sortStrategy = new SingleAxisSortStrategy(this.element, _dragDropRegistry);\n this._sortStrategy.withSortPredicate((index, item) => this.sortPredicate(index, item, this));\n }\n /** Removes the drop list functionality from the DOM element. */\n dispose() {\n this._stopScrolling();\n this._stopScrollTimers.complete();\n this._viewportScrollSubscription.unsubscribe();\n this.beforeStarted.complete();\n this.entered.complete();\n this.exited.complete();\n this.dropped.complete();\n this.sorted.complete();\n this._activeSiblings.clear();\n this._scrollNode = null;\n this._parentPositions.clear();\n this._dragDropRegistry.removeDropContainer(this);\n }\n /** Whether an item from this list is currently being dragged. */\n isDragging() {\n return this._isDragging;\n }\n /** Starts dragging an item. */\n start() {\n this._draggingStarted();\n this._notifyReceivingSiblings();\n }\n /**\n * Attempts to move an item into the container.\n * @param item Item that was moved into the container.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param index Index at which the item entered. If omitted, the container will try to figure it\n * out automatically.\n */\n enter(item, pointerX, pointerY, index) {\n this._draggingStarted();\n // If sorting is disabled, we want the item to return to its starting\n // position if the user is returning it to its initial container.\n if (index == null && this.sortingDisabled) {\n index = this._draggables.indexOf(item);\n }\n this._sortStrategy.enter(item, pointerX, pointerY, index);\n // Note that this usually happens inside `_draggingStarted` as well, but the dimensions\n // can change when the sort strategy moves the item around inside `enter`.\n this._cacheParentPositions();\n // Notify siblings at the end so that the item has been inserted into the `activeDraggables`.\n this._notifyReceivingSiblings();\n this.entered.next({ item, container: this, currentIndex: this.getItemIndex(item) });\n }\n /**\n * Removes an item from the container after it was dragged into another container by the user.\n * @param item Item that was dragged out.\n */\n exit(item) {\n this._reset();\n this.exited.next({ item, container: this });\n }\n /**\n * Drops an item into this container.\n * @param item Item being dropped into the container.\n * @param currentIndex Index at which the item should be inserted.\n * @param previousIndex Index of the item when dragging started.\n * @param previousContainer Container from which the item got dragged in.\n * @param isPointerOverContainer Whether the user's pointer was over the\n * container when the item was dropped.\n * @param distance Distance the user has dragged since the start of the dragging sequence.\n * @param event Event that triggered the dropping sequence.\n *\n * @breaking-change 15.0.0 `previousIndex` and `event` parameters to become required.\n */\n drop(item, currentIndex, previousIndex, previousContainer, isPointerOverContainer, distance, dropPoint, event = {}) {\n this._reset();\n this.dropped.next({\n item,\n currentIndex,\n previousIndex,\n container: this,\n previousContainer,\n isPointerOverContainer,\n distance,\n dropPoint,\n event,\n });\n }\n /**\n * Sets the draggable items that are a part of this list.\n * @param items Items that are a part of this list.\n */\n withItems(items) {\n const previousItems = this._draggables;\n this._draggables = items;\n items.forEach(item => item._withDropContainer(this));\n if (this.isDragging()) {\n const draggedItems = previousItems.filter(item => item.isDragging());\n // If all of the items being dragged were removed\n // from the list, abort the current drag sequence.\n if (draggedItems.every(item => items.indexOf(item) === -1)) {\n this._reset();\n }\n else {\n this._sortStrategy.withItems(this._draggables);\n }\n }\n return this;\n }\n /** Sets the layout direction of the drop list. */\n withDirection(direction) {\n this._sortStrategy.direction = direction;\n return this;\n }\n /**\n * Sets the containers that are connected to this one. When two or more containers are\n * connected, the user will be allowed to transfer items between them.\n * @param connectedTo Other containers that the current containers should be connected to.\n */\n connectedTo(connectedTo) {\n this._siblings = connectedTo.slice();\n return this;\n }\n /**\n * Sets the orientation of the container.\n * @param orientation New orientation for the container.\n */\n withOrientation(orientation) {\n // TODO(crisbeto): eventually we should be constructing the new sort strategy here based on\n // the new orientation. For now we can assume that it'll always be `SingleAxisSortStrategy`.\n this._sortStrategy.orientation = orientation;\n return this;\n }\n /**\n * Sets which parent elements are can be scrolled while the user is dragging.\n * @param elements Elements that can be scrolled.\n */\n withScrollableParents(elements) {\n const element = coerceElement(this.element);\n // We always allow the current element to be scrollable\n // so we need to ensure that it's in the array.\n this._scrollableElements =\n elements.indexOf(element) === -1 ? [element, ...elements] : elements.slice();\n return this;\n }\n /** Gets the scrollable parents that are registered with this drop container. */\n getScrollableParents() {\n return this._scrollableElements;\n }\n /**\n * Figures out the index of an item in the container.\n * @param item Item whose index should be determined.\n */\n getItemIndex(item) {\n return this._isDragging\n ? this._sortStrategy.getItemIndex(item)\n : this._draggables.indexOf(item);\n }\n /**\n * Whether the list is able to receive the item that\n * is currently being dragged inside a connected drop list.\n */\n isReceiving() {\n return this._activeSiblings.size > 0;\n }\n /**\n * Sorts an item inside the container based on its position.\n * @param item Item to be sorted.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param pointerDelta Direction in which the pointer is moving along each axis.\n */\n _sortItem(item, pointerX, pointerY, pointerDelta) {\n // Don't sort the item if sorting is disabled or it's out of range.\n if (this.sortingDisabled ||\n !this._clientRect ||\n !isPointerNearClientRect(this._clientRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {\n return;\n }\n const result = this._sortStrategy.sort(item, pointerX, pointerY, pointerDelta);\n if (result) {\n this.sorted.next({\n previousIndex: result.previousIndex,\n currentIndex: result.currentIndex,\n container: this,\n item,\n });\n }\n }\n /**\n * Checks whether the user's pointer is close to the edges of either the\n * viewport or the drop list and starts the auto-scroll sequence.\n * @param pointerX User's pointer position along the x axis.\n * @param pointerY User's pointer position along the y axis.\n */\n _startScrollingIfNecessary(pointerX, pointerY) {\n if (this.autoScrollDisabled) {\n return;\n }\n let scrollNode;\n let verticalScrollDirection = 0 /* AutoScrollVerticalDirection.NONE */;\n let horizontalScrollDirection = 0 /* AutoScrollHorizontalDirection.NONE */;\n // Check whether we should start scrolling any of the parent containers.\n this._parentPositions.positions.forEach((position, element) => {\n // We have special handling for the `document` below. Also this would be\n // nicer with a for...of loop, but it requires changing a compiler flag.\n if (element === this._document || !position.clientRect || scrollNode) {\n return;\n }\n if (isPointerNearClientRect(position.clientRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {\n [verticalScrollDirection, horizontalScrollDirection] = getElementScrollDirections(element, position.clientRect, pointerX, pointerY);\n if (verticalScrollDirection || horizontalScrollDirection) {\n scrollNode = element;\n }\n }\n });\n // Otherwise check if we can start scrolling the viewport.\n if (!verticalScrollDirection && !horizontalScrollDirection) {\n const { width, height } = this._viewportRuler.getViewportSize();\n const clientRect = {\n width,\n height,\n top: 0,\n right: width,\n bottom: height,\n left: 0,\n };\n verticalScrollDirection = getVerticalScrollDirection(clientRect, pointerY);\n horizontalScrollDirection = getHorizontalScrollDirection(clientRect, pointerX);\n scrollNode = window;\n }\n if (scrollNode &&\n (verticalScrollDirection !== this._verticalScrollDirection ||\n horizontalScrollDirection !== this._horizontalScrollDirection ||\n scrollNode !== this._scrollNode)) {\n this._verticalScrollDirection = verticalScrollDirection;\n this._horizontalScrollDirection = horizontalScrollDirection;\n this._scrollNode = scrollNode;\n if ((verticalScrollDirection || horizontalScrollDirection) && scrollNode) {\n this._ngZone.runOutsideAngular(this._startScrollInterval);\n }\n else {\n this._stopScrolling();\n }\n }\n }\n /** Stops any currently-running auto-scroll sequences. */\n _stopScrolling() {\n this._stopScrollTimers.next();\n }\n /** Starts the dragging sequence within the list. */\n _draggingStarted() {\n const styles = coerceElement(this.element).style;\n this.beforeStarted.next();\n this._isDragging = true;\n // We need to disable scroll snapping while the user is dragging, because it breaks automatic\n // scrolling. The browser seems to round the value based on the snapping points which means\n // that we can't increment/decrement the scroll position.\n this._initialScrollSnap = styles.msScrollSnapType || styles.scrollSnapType || '';\n styles.scrollSnapType = styles.msScrollSnapType = 'none';\n this._sortStrategy.start(this._draggables);\n this._cacheParentPositions();\n this._viewportScrollSubscription.unsubscribe();\n this._listenToScrollEvents();\n }\n /** Caches the positions of the configured scrollable parents. */\n _cacheParentPositions() {\n const element = coerceElement(this.element);\n this._parentPositions.cache(this._scrollableElements);\n // The list element is always in the `scrollableElements`\n // so we can take advantage of the cached `ClientRect`.\n this._clientRect = this._parentPositions.positions.get(element).clientRect;\n }\n /** Resets the container to its initial state. */\n _reset() {\n this._isDragging = false;\n const styles = coerceElement(this.element).style;\n styles.scrollSnapType = styles.msScrollSnapType = this._initialScrollSnap;\n this._siblings.forEach(sibling => sibling._stopReceiving(this));\n this._sortStrategy.reset();\n this._stopScrolling();\n this._viewportScrollSubscription.unsubscribe();\n this._parentPositions.clear();\n }\n /**\n * Checks whether the user's pointer is positioned over the container.\n * @param x Pointer position along the X axis.\n * @param y Pointer position along the Y axis.\n */\n _isOverContainer(x, y) {\n return this._clientRect != null && isInsideClientRect(this._clientRect, x, y);\n }\n /**\n * Figures out whether an item should be moved into a sibling\n * drop container, based on its current position.\n * @param item Drag item that is being moved.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n _getSiblingContainerFromPosition(item, x, y) {\n return this._siblings.find(sibling => sibling._canReceive(item, x, y));\n }\n /**\n * Checks whether the drop list can receive the passed-in item.\n * @param item Item that is being dragged into the list.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n _canReceive(item, x, y) {\n if (!this._clientRect ||\n !isInsideClientRect(this._clientRect, x, y) ||\n !this.enterPredicate(item, this)) {\n return false;\n }\n const elementFromPoint = this._getShadowRoot().elementFromPoint(x, y);\n // If there's no element at the pointer position, then\n // the client rect is probably scrolled out of the view.\n if (!elementFromPoint) {\n return false;\n }\n const nativeElement = coerceElement(this.element);\n // The `ClientRect`, that we're using to find the container over which the user is\n // hovering, doesn't give us any information on whether the element has been scrolled\n // out of the view or whether it's overlapping with other containers. This means that\n // we could end up transferring the item into a container that's invisible or is positioned\n // below another one. We use the result from `elementFromPoint` to get the top-most element\n // at the pointer position and to find whether it's one of the intersecting drop containers.\n return elementFromPoint === nativeElement || nativeElement.contains(elementFromPoint);\n }\n /**\n * Called by one of the connected drop lists when a dragging sequence has started.\n * @param sibling Sibling in which dragging has started.\n */\n _startReceiving(sibling, items) {\n const activeSiblings = this._activeSiblings;\n if (!activeSiblings.has(sibling) &&\n items.every(item => {\n // Note that we have to add an exception to the `enterPredicate` for items that started off\n // in this drop list. The drag ref has logic that allows an item to return to its initial\n // container, if it has left the initial container and none of the connected containers\n // allow it to enter. See `DragRef._updateActiveDropContainer` for more context.\n return this.enterPredicate(item, this) || this._draggables.indexOf(item) > -1;\n })) {\n activeSiblings.add(sibling);\n this._cacheParentPositions();\n this._listenToScrollEvents();\n }\n }\n /**\n * Called by a connected drop list when dragging has stopped.\n * @param sibling Sibling whose dragging has stopped.\n */\n _stopReceiving(sibling) {\n this._activeSiblings.delete(sibling);\n this._viewportScrollSubscription.unsubscribe();\n }\n /**\n * Starts listening to scroll events on the viewport.\n * Used for updating the internal state of the list.\n */\n _listenToScrollEvents() {\n this._viewportScrollSubscription = this._dragDropRegistry\n .scrolled(this._getShadowRoot())\n .subscribe(event => {\n if (this.isDragging()) {\n const scrollDifference = this._parentPositions.handleScroll(event);\n if (scrollDifference) {\n this._sortStrategy.updateOnScroll(scrollDifference.top, scrollDifference.left);\n }\n }\n else if (this.isReceiving()) {\n this._cacheParentPositions();\n }\n });\n }\n /**\n * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n * than saving it in property directly on init, because we want to resolve it as late as possible\n * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n */\n _getShadowRoot() {\n if (!this._cachedShadowRoot) {\n const shadowRoot = _getShadowRoot(coerceElement(this.element));\n this._cachedShadowRoot = (shadowRoot || this._document);\n }\n return this._cachedShadowRoot;\n }\n /** Notifies any siblings that may potentially receive the item. */\n _notifyReceivingSiblings() {\n const draggedItems = this._sortStrategy\n .getActiveItemsSnapshot()\n .filter(item => item.isDragging());\n this._siblings.forEach(sibling => sibling._startReceiving(this, draggedItems));\n }\n}\n/**\n * Gets whether the vertical auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getVerticalScrollDirection(clientRect, pointerY) {\n const { top, bottom, height } = clientRect;\n const yThreshold = height * SCROLL_PROXIMITY_THRESHOLD;\n if (pointerY >= top - yThreshold && pointerY <= top + yThreshold) {\n return 1 /* AutoScrollVerticalDirection.UP */;\n }\n else if (pointerY >= bottom - yThreshold && pointerY <= bottom + yThreshold) {\n return 2 /* AutoScrollVerticalDirection.DOWN */;\n }\n return 0 /* AutoScrollVerticalDirection.NONE */;\n}\n/**\n * Gets whether the horizontal auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerX Position of the user's pointer along the x axis.\n */\nfunction getHorizontalScrollDirection(clientRect, pointerX) {\n const { left, right, width } = clientRect;\n const xThreshold = width * SCROLL_PROXIMITY_THRESHOLD;\n if (pointerX >= left - xThreshold && pointerX <= left + xThreshold) {\n return 1 /* AutoScrollHorizontalDirection.LEFT */;\n }\n else if (pointerX >= right - xThreshold && pointerX <= right + xThreshold) {\n return 2 /* AutoScrollHorizontalDirection.RIGHT */;\n }\n return 0 /* AutoScrollHorizontalDirection.NONE */;\n}\n/**\n * Gets the directions in which an element node should be scrolled,\n * assuming that the user's pointer is already within it scrollable region.\n * @param element Element for which we should calculate the scroll direction.\n * @param clientRect Bounding client rectangle of the element.\n * @param pointerX Position of the user's pointer along the x axis.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getElementScrollDirections(element, clientRect, pointerX, pointerY) {\n const computedVertical = getVerticalScrollDirection(clientRect, pointerY);\n const computedHorizontal = getHorizontalScrollDirection(clientRect, pointerX);\n let verticalScrollDirection = 0 /* AutoScrollVerticalDirection.NONE */;\n let horizontalScrollDirection = 0 /* AutoScrollHorizontalDirection.NONE */;\n // Note that we here we do some extra checks for whether the element is actually scrollable in\n // a certain direction and we only assign the scroll direction if it is. We do this so that we\n // can allow other elements to be scrolled, if the current element can't be scrolled anymore.\n // This allows us to handle cases where the scroll regions of two scrollable elements overlap.\n if (computedVertical) {\n const scrollTop = element.scrollTop;\n if (computedVertical === 1 /* AutoScrollVerticalDirection.UP */) {\n if (scrollTop > 0) {\n verticalScrollDirection = 1 /* AutoScrollVerticalDirection.UP */;\n }\n }\n else if (element.scrollHeight - scrollTop > element.clientHeight) {\n verticalScrollDirection = 2 /* AutoScrollVerticalDirection.DOWN */;\n }\n }\n if (computedHorizontal) {\n const scrollLeft = element.scrollLeft;\n if (computedHorizontal === 1 /* AutoScrollHorizontalDirection.LEFT */) {\n if (scrollLeft > 0) {\n horizontalScrollDirection = 1 /* AutoScrollHorizontalDirection.LEFT */;\n }\n }\n else if (element.scrollWidth - scrollLeft > element.clientWidth) {\n horizontalScrollDirection = 2 /* AutoScrollHorizontalDirection.RIGHT */;\n }\n }\n return [verticalScrollDirection, horizontalScrollDirection];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Event options that can be used to bind an active, capturing event. */\nconst activeCapturingEventOptions = normalizePassiveListenerOptions({\n passive: false,\n capture: true,\n});\n/**\n * Service that keeps track of all the drag item and drop container\n * instances, and manages global event listeners on the `document`.\n * @docs-private\n */\n// Note: this class is generic, rather than referencing CdkDrag and CdkDropList directly, in order\n// to avoid circular imports. If we were to reference them here, importing the registry into the\n// classes that are registering themselves will introduce a circular import.\nclass DragDropRegistry {\n constructor(_ngZone, _document) {\n this._ngZone = _ngZone;\n /** Registered drop container instances. */\n this._dropInstances = new Set();\n /** Registered drag item instances. */\n this._dragInstances = new Set();\n /** Drag item instances that are currently being dragged. */\n this._activeDragInstances = [];\n /** Keeps track of the event listeners that we've bound to the `document`. */\n this._globalListeners = new Map();\n /**\n * Predicate function to check if an item is being dragged. Moved out into a property,\n * because it'll be called a lot and we don't want to create a new function every time.\n */\n this._draggingPredicate = (item) => item.isDragging();\n /**\n * Emits the `touchmove` or `mousemove` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n this.pointerMove = new Subject();\n /**\n * Emits the `touchend` or `mouseup` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n this.pointerUp = new Subject();\n /**\n * Emits when the viewport has been scrolled while the user is dragging an item.\n * @deprecated To be turned into a private member. Use the `scrolled` method instead.\n * @breaking-change 13.0.0\n */\n this.scroll = new Subject();\n /**\n * Event listener that will prevent the default browser action while the user is dragging.\n * @param event Event whose default action should be prevented.\n */\n this._preventDefaultWhileDragging = (event) => {\n if (this._activeDragInstances.length > 0) {\n event.preventDefault();\n }\n };\n /** Event listener for `touchmove` that is bound even if no dragging is happening. */\n this._persistentTouchmoveListener = (event) => {\n if (this._activeDragInstances.length > 0) {\n // Note that we only want to prevent the default action after dragging has actually started.\n // Usually this is the same time at which the item is added to the `_activeDragInstances`,\n // but it could be pushed back if the user has set up a drag delay or threshold.\n if (this._activeDragInstances.some(this._draggingPredicate)) {\n event.preventDefault();\n }\n this.pointerMove.next(event);\n }\n };\n this._document = _document;\n }\n /** Adds a drop container to the registry. */\n registerDropContainer(drop) {\n if (!this._dropInstances.has(drop)) {\n this._dropInstances.add(drop);\n }\n }\n /** Adds a drag item instance to the registry. */\n registerDragItem(drag) {\n this._dragInstances.add(drag);\n // The `touchmove` event gets bound once, ahead of time, because WebKit\n // won't preventDefault on a dynamically-added `touchmove` listener.\n // See https://bugs.webkit.org/show_bug.cgi?id=184250.\n if (this._dragInstances.size === 1) {\n this._ngZone.runOutsideAngular(() => {\n // The event handler has to be explicitly active,\n // because newer browsers make it passive by default.\n this._document.addEventListener('touchmove', this._persistentTouchmoveListener, activeCapturingEventOptions);\n });\n }\n }\n /** Removes a drop container from the registry. */\n removeDropContainer(drop) {\n this._dropInstances.delete(drop);\n }\n /** Removes a drag item instance from the registry. */\n removeDragItem(drag) {\n this._dragInstances.delete(drag);\n this.stopDragging(drag);\n if (this._dragInstances.size === 0) {\n this._document.removeEventListener('touchmove', this._persistentTouchmoveListener, activeCapturingEventOptions);\n }\n }\n /**\n * Starts the dragging sequence for a drag instance.\n * @param drag Drag instance which is being dragged.\n * @param event Event that initiated the dragging.\n */\n startDragging(drag, event) {\n // Do not process the same drag twice to avoid memory leaks and redundant listeners\n if (this._activeDragInstances.indexOf(drag) > -1) {\n return;\n }\n this._activeDragInstances.push(drag);\n if (this._activeDragInstances.length === 1) {\n const isTouchEvent = event.type.startsWith('touch');\n // We explicitly bind __active__ listeners here, because newer browsers will default to\n // passive ones for `mousemove` and `touchmove`. The events need to be active, because we\n // use `preventDefault` to prevent the page from scrolling while the user is dragging.\n this._globalListeners\n .set(isTouchEvent ? 'touchend' : 'mouseup', {\n handler: (e) => this.pointerUp.next(e),\n options: true,\n })\n .set('scroll', {\n handler: (e) => this.scroll.next(e),\n // Use capturing so that we pick up scroll changes in any scrollable nodes that aren't\n // the document. See https://github.com/angular/components/issues/17144.\n options: true,\n })\n // Preventing the default action on `mousemove` isn't enough to disable text selection\n // on Safari so we need to prevent the selection event as well. Alternatively this can\n // be done by setting `user-select: none` on the `body`, however it has causes a style\n // recalculation which can be expensive on pages with a lot of elements.\n .set('selectstart', {\n handler: this._preventDefaultWhileDragging,\n options: activeCapturingEventOptions,\n });\n // We don't have to bind a move event for touch drag sequences, because\n // we already have a persistent global one bound from `registerDragItem`.\n if (!isTouchEvent) {\n this._globalListeners.set('mousemove', {\n handler: (e) => this.pointerMove.next(e),\n options: activeCapturingEventOptions,\n });\n }\n this._ngZone.runOutsideAngular(() => {\n this._globalListeners.forEach((config, name) => {\n this._document.addEventListener(name, config.handler, config.options);\n });\n });\n }\n }\n /** Stops dragging a drag item instance. */\n stopDragging(drag) {\n const index = this._activeDragInstances.indexOf(drag);\n if (index > -1) {\n this._activeDragInstances.splice(index, 1);\n if (this._activeDragInstances.length === 0) {\n this._clearGlobalListeners();\n }\n }\n }\n /** Gets whether a drag item instance is currently being dragged. */\n isDragging(drag) {\n return this._activeDragInstances.indexOf(drag) > -1;\n }\n /**\n * Gets a stream that will emit when any element on the page is scrolled while an item is being\n * dragged.\n * @param shadowRoot Optional shadow root that the current dragging sequence started from.\n * Top-level listeners won't pick up events coming from the shadow DOM so this parameter can\n * be used to include an additional top-level listener at the shadow root level.\n */\n scrolled(shadowRoot) {\n const streams = [this.scroll];\n if (shadowRoot && shadowRoot !== this._document) {\n // Note that this is basically the same as `fromEvent` from rjxs, but we do it ourselves,\n // because we want to guarantee that the event is bound outside of the `NgZone`. With\n // `fromEvent` it'll only happen if the subscription is outside the `NgZone`.\n streams.push(new Observable((observer) => {\n return this._ngZone.runOutsideAngular(() => {\n const eventOptions = true;\n const callback = (event) => {\n if (this._activeDragInstances.length) {\n observer.next(event);\n }\n };\n shadowRoot.addEventListener('scroll', callback, eventOptions);\n return () => {\n shadowRoot.removeEventListener('scroll', callback, eventOptions);\n };\n });\n }));\n }\n return merge(...streams);\n }\n ngOnDestroy() {\n this._dragInstances.forEach(instance => this.removeDragItem(instance));\n this._dropInstances.forEach(instance => this.removeDropContainer(instance));\n this._clearGlobalListeners();\n this.pointerMove.complete();\n this.pointerUp.complete();\n }\n /** Clears out the global event listeners from the `document`. */\n _clearGlobalListeners() {\n this._globalListeners.forEach((config, name) => {\n this._document.removeEventListener(name, config.handler, config.options);\n });\n this._globalListeners.clear();\n }\n}\nDragDropRegistry.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: DragDropRegistry, deps: [{ token: i0.NgZone }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDragDropRegistry.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: DragDropRegistry, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: DragDropRegistry, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Default configuration to be used when creating a `DragRef`. */\nconst DEFAULT_CONFIG = {\n dragStartThreshold: 5,\n pointerDirectionChangeThreshold: 5,\n};\n/**\n * Service that allows for drag-and-drop functionality to be attached to DOM elements.\n */\nclass DragDrop {\n constructor(_document, _ngZone, _viewportRuler, _dragDropRegistry) {\n this._document = _document;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._dragDropRegistry = _dragDropRegistry;\n }\n /**\n * Turns an element into a draggable item.\n * @param element Element to which to attach the dragging functionality.\n * @param config Object used to configure the dragging behavior.\n */\n createDrag(element, config = DEFAULT_CONFIG) {\n return new DragRef(element, config, this._document, this._ngZone, this._viewportRuler, this._dragDropRegistry);\n }\n /**\n * Turns an element into a drop list.\n * @param element Element to which to attach the drop list functionality.\n */\n createDropList(element) {\n return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);\n }\n}\nDragDrop.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: DragDrop, deps: [{ token: DOCUMENT }, { token: i0.NgZone }, { token: i1.ViewportRuler }, { token: DragDropRegistry }], target: i0.ɵɵFactoryTarget.Injectable });\nDragDrop.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: DragDrop, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: DragDrop, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.NgZone }, { type: i1.ViewportRuler }, { type: DragDropRegistry }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injection token that can be used for a `CdkDrag` to provide itself as a parent to the\n * drag-specific child directive (`CdkDragHandle`, `CdkDragPreview` etc.). Used primarily\n * to avoid circular imports.\n * @docs-private\n */\nconst CDK_DRAG_PARENT = new InjectionToken('CDK_DRAG_PARENT');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injection token that can be used to reference instances of `CdkDropListGroup`. It serves as\n * alternative token to the actual `CdkDropListGroup` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DROP_LIST_GROUP = new InjectionToken('CdkDropListGroup');\n/**\n * Declaratively connects sibling `cdkDropList` instances together. All of the `cdkDropList`\n * elements that are placed inside a `cdkDropListGroup` will be connected to each other\n * automatically. Can be used as an alternative to the `cdkDropListConnectedTo` input\n * from `cdkDropList`.\n */\nclass CdkDropListGroup {\n constructor() {\n /** Drop lists registered inside the group. */\n this._items = new Set();\n this._disabled = false;\n }\n /** Whether starting a dragging sequence from inside this group is disabled. */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n }\n ngOnDestroy() {\n this._items.clear();\n }\n}\nCdkDropListGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkDropListGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nCdkDropListGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkDropListGroup, selector: \"[cdkDropListGroup]\", inputs: { disabled: [\"cdkDropListGroupDisabled\", \"disabled\"] }, providers: [{ provide: CDK_DROP_LIST_GROUP, useExisting: CdkDropListGroup }], exportAs: [\"cdkDropListGroup\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkDropListGroup, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkDropListGroup]',\n exportAs: 'cdkDropListGroup',\n providers: [{ provide: CDK_DROP_LIST_GROUP, useExisting: CdkDropListGroup }],\n }]\n }], propDecorators: { disabled: [{\n type: Input,\n args: ['cdkDropListGroupDisabled']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injection token that can be used to configure the\n * behavior of the drag&drop-related components.\n */\nconst CDK_DRAG_CONFIG = new InjectionToken('CDK_DRAG_CONFIG');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Asserts that a particular node is an element.\n * @param node Node to be checked.\n * @param name Name to attach to the error message.\n */\nfunction assertElementNode(node, name) {\n if (node.nodeType !== 1) {\n throw Error(`${name} must be attached to an element node. ` + `Currently attached to \"${node.nodeName}\".`);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Counter used to generate unique ids for drop zones. */\nlet _uniqueIdCounter = 0;\n/**\n * Injection token that can be used to reference instances of `CdkDropList`. It serves as\n * alternative token to the actual `CdkDropList` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DROP_LIST = new InjectionToken('CdkDropList');\n/** Container that wraps a set of draggable items. */\nclass CdkDropList {\n constructor(\n /** Element that the drop list is attached to. */\n element, dragDrop, _changeDetectorRef, _scrollDispatcher, _dir, _group, config) {\n this.element = element;\n this._changeDetectorRef = _changeDetectorRef;\n this._scrollDispatcher = _scrollDispatcher;\n this._dir = _dir;\n this._group = _group;\n /** Emits when the list has been destroyed. */\n this._destroyed = new Subject();\n /**\n * Other draggable containers that this container is connected to and into which the\n * container's items can be transferred. Can either be references to other drop containers,\n * or their unique IDs.\n */\n this.connectedTo = [];\n /**\n * Unique ID for the drop zone. Can be used as a reference\n * in the `connectedTo` of another `CdkDropList`.\n */\n this.id = `cdk-drop-list-${_uniqueIdCounter++}`;\n /**\n * Function that is used to determine whether an item\n * is allowed to be moved into a drop container.\n */\n this.enterPredicate = () => true;\n /** Functions that is used to determine whether an item can be sorted into a particular index. */\n this.sortPredicate = () => true;\n /** Emits when the user drops an item inside the container. */\n this.dropped = new EventEmitter();\n /**\n * Emits when the user has moved a new drag item into this container.\n */\n this.entered = new EventEmitter();\n /**\n * Emits when the user removes an item from the container\n * by dragging it into another container.\n */\n this.exited = new EventEmitter();\n /** Emits as the user is swapping items while actively dragging. */\n this.sorted = new EventEmitter();\n /**\n * Keeps track of the items that are registered with this container. Historically we used to\n * do this with a `ContentChildren` query, however queries don't handle transplanted views very\n * well which means that we can't handle cases like dragging the headers of a `mat-table`\n * correctly. What we do instead is to have the items register themselves with the container\n * and then we sort them based on their position in the DOM.\n */\n this._unsortedItems = new Set();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertElementNode(element.nativeElement, 'cdkDropList');\n }\n this._dropListRef = dragDrop.createDropList(element);\n this._dropListRef.data = this;\n if (config) {\n this._assignDefaults(config);\n }\n this._dropListRef.enterPredicate = (drag, drop) => {\n return this.enterPredicate(drag.data, drop.data);\n };\n this._dropListRef.sortPredicate = (index, drag, drop) => {\n return this.sortPredicate(index, drag.data, drop.data);\n };\n this._setupInputSyncSubscription(this._dropListRef);\n this._handleEvents(this._dropListRef);\n CdkDropList._dropLists.push(this);\n if (_group) {\n _group._items.add(this);\n }\n }\n /** Whether starting a dragging sequence from this container is disabled. */\n get disabled() {\n return this._disabled || (!!this._group && this._group.disabled);\n }\n set disabled(value) {\n // Usually we sync the directive and ref state right before dragging starts, in order to have\n // a single point of failure and to avoid having to use setters for everything. `disabled` is\n // a special case, because it can prevent the `beforeStarted` event from firing, which can lock\n // the user in a disabled state, so we also need to sync it as it's being set.\n this._dropListRef.disabled = this._disabled = coerceBooleanProperty(value);\n }\n /** Registers an items with the drop list. */\n addItem(item) {\n this._unsortedItems.add(item);\n if (this._dropListRef.isDragging()) {\n this._syncItemsWithRef();\n }\n }\n /** Removes an item from the drop list. */\n removeItem(item) {\n this._unsortedItems.delete(item);\n if (this._dropListRef.isDragging()) {\n this._syncItemsWithRef();\n }\n }\n /** Gets the registered items in the list, sorted by their position in the DOM. */\n getSortedItems() {\n return Array.from(this._unsortedItems).sort((a, b) => {\n const documentPosition = a._dragRef\n .getVisibleElement()\n .compareDocumentPosition(b._dragRef.getVisibleElement());\n // `compareDocumentPosition` returns a bitmask so we have to use a bitwise operator.\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n // tslint:disable-next-line:no-bitwise\n return documentPosition & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;\n });\n }\n ngOnDestroy() {\n const index = CdkDropList._dropLists.indexOf(this);\n if (index > -1) {\n CdkDropList._dropLists.splice(index, 1);\n }\n if (this._group) {\n this._group._items.delete(this);\n }\n this._unsortedItems.clear();\n this._dropListRef.dispose();\n this._destroyed.next();\n this._destroyed.complete();\n }\n /** Syncs the inputs of the CdkDropList with the options of the underlying DropListRef. */\n _setupInputSyncSubscription(ref) {\n if (this._dir) {\n this._dir.change\n .pipe(startWith(this._dir.value), takeUntil(this._destroyed))\n .subscribe(value => ref.withDirection(value));\n }\n ref.beforeStarted.subscribe(() => {\n const siblings = coerceArray(this.connectedTo).map(drop => {\n if (typeof drop === 'string') {\n const correspondingDropList = CdkDropList._dropLists.find(list => list.id === drop);\n if (!correspondingDropList && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n console.warn(`CdkDropList could not find connected drop list with id \"${drop}\"`);\n }\n return correspondingDropList;\n }\n return drop;\n });\n if (this._group) {\n this._group._items.forEach(drop => {\n if (siblings.indexOf(drop) === -1) {\n siblings.push(drop);\n }\n });\n }\n // Note that we resolve the scrollable parents here so that we delay the resolution\n // as long as possible, ensuring that the element is in its final place in the DOM.\n if (!this._scrollableParentsResolved) {\n const scrollableParents = this._scrollDispatcher\n .getAncestorScrollContainers(this.element)\n .map(scrollable => scrollable.getElementRef().nativeElement);\n this._dropListRef.withScrollableParents(scrollableParents);\n // Only do this once since it involves traversing the DOM and the parents\n // shouldn't be able to change without the drop list being destroyed.\n this._scrollableParentsResolved = true;\n }\n ref.disabled = this.disabled;\n ref.lockAxis = this.lockAxis;\n ref.sortingDisabled = coerceBooleanProperty(this.sortingDisabled);\n ref.autoScrollDisabled = coerceBooleanProperty(this.autoScrollDisabled);\n ref.autoScrollStep = coerceNumberProperty(this.autoScrollStep, 2);\n ref\n .connectedTo(siblings.filter(drop => drop && drop !== this).map(list => list._dropListRef))\n .withOrientation(this.orientation);\n });\n }\n /** Handles events from the underlying DropListRef. */\n _handleEvents(ref) {\n ref.beforeStarted.subscribe(() => {\n this._syncItemsWithRef();\n this._changeDetectorRef.markForCheck();\n });\n ref.entered.subscribe(event => {\n this.entered.emit({\n container: this,\n item: event.item.data,\n currentIndex: event.currentIndex,\n });\n });\n ref.exited.subscribe(event => {\n this.exited.emit({\n container: this,\n item: event.item.data,\n });\n this._changeDetectorRef.markForCheck();\n });\n ref.sorted.subscribe(event => {\n this.sorted.emit({\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n container: this,\n item: event.item.data,\n });\n });\n ref.dropped.subscribe(dropEvent => {\n this.dropped.emit({\n previousIndex: dropEvent.previousIndex,\n currentIndex: dropEvent.currentIndex,\n previousContainer: dropEvent.previousContainer.data,\n container: dropEvent.container.data,\n item: dropEvent.item.data,\n isPointerOverContainer: dropEvent.isPointerOverContainer,\n distance: dropEvent.distance,\n dropPoint: dropEvent.dropPoint,\n event: dropEvent.event,\n });\n // Mark for check since all of these events run outside of change\n // detection and we're not guaranteed for something else to have triggered it.\n this._changeDetectorRef.markForCheck();\n });\n }\n /** Assigns the default input values based on a provided config object. */\n _assignDefaults(config) {\n const { lockAxis, draggingDisabled, sortingDisabled, listAutoScrollDisabled, listOrientation } = config;\n this.disabled = draggingDisabled == null ? false : draggingDisabled;\n this.sortingDisabled = sortingDisabled == null ? false : sortingDisabled;\n this.autoScrollDisabled = listAutoScrollDisabled == null ? false : listAutoScrollDisabled;\n this.orientation = listOrientation || 'vertical';\n if (lockAxis) {\n this.lockAxis = lockAxis;\n }\n }\n /** Syncs up the registered drag items with underlying drop list ref. */\n _syncItemsWithRef() {\n this._dropListRef.withItems(this.getSortedItems().map(item => item._dragRef));\n }\n}\n/** Keeps track of the drop lists that are currently on the page. */\nCdkDropList._dropLists = [];\nCdkDropList.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkDropList, deps: [{ token: i0.ElementRef }, { token: DragDrop }, { token: i0.ChangeDetectorRef }, { token: i1.ScrollDispatcher }, { token: i3.Directionality, optional: true }, { token: CDK_DROP_LIST_GROUP, optional: true, skipSelf: true }, { token: CDK_DRAG_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkDropList.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkDropList, selector: \"[cdkDropList], cdk-drop-list\", inputs: { connectedTo: [\"cdkDropListConnectedTo\", \"connectedTo\"], data: [\"cdkDropListData\", \"data\"], orientation: [\"cdkDropListOrientation\", \"orientation\"], id: \"id\", lockAxis: [\"cdkDropListLockAxis\", \"lockAxis\"], disabled: [\"cdkDropListDisabled\", \"disabled\"], sortingDisabled: [\"cdkDropListSortingDisabled\", \"sortingDisabled\"], enterPredicate: [\"cdkDropListEnterPredicate\", \"enterPredicate\"], sortPredicate: [\"cdkDropListSortPredicate\", \"sortPredicate\"], autoScrollDisabled: [\"cdkDropListAutoScrollDisabled\", \"autoScrollDisabled\"], autoScrollStep: [\"cdkDropListAutoScrollStep\", \"autoScrollStep\"] }, outputs: { dropped: \"cdkDropListDropped\", entered: \"cdkDropListEntered\", exited: \"cdkDropListExited\", sorted: \"cdkDropListSorted\" }, host: { properties: { \"attr.id\": \"id\", \"class.cdk-drop-list-disabled\": \"disabled\", \"class.cdk-drop-list-dragging\": \"_dropListRef.isDragging()\", \"class.cdk-drop-list-receiving\": \"_dropListRef.isReceiving()\" }, classAttribute: \"cdk-drop-list\" }, providers: [\n // Prevent child drop lists from picking up the same group as their parent.\n { provide: CDK_DROP_LIST_GROUP, useValue: undefined },\n { provide: CDK_DROP_LIST, useExisting: CdkDropList },\n ], exportAs: [\"cdkDropList\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkDropList, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkDropList], cdk-drop-list',\n exportAs: 'cdkDropList',\n providers: [\n // Prevent child drop lists from picking up the same group as their parent.\n { provide: CDK_DROP_LIST_GROUP, useValue: undefined },\n { provide: CDK_DROP_LIST, useExisting: CdkDropList },\n ],\n host: {\n 'class': 'cdk-drop-list',\n '[attr.id]': 'id',\n '[class.cdk-drop-list-disabled]': 'disabled',\n '[class.cdk-drop-list-dragging]': '_dropListRef.isDragging()',\n '[class.cdk-drop-list-receiving]': '_dropListRef.isReceiving()',\n },\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: DragDrop }, { type: i0.ChangeDetectorRef }, { type: i1.ScrollDispatcher }, { type: i3.Directionality, decorators: [{\n type: Optional\n }] }, { type: CdkDropListGroup, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [CDK_DROP_LIST_GROUP]\n }, {\n type: SkipSelf\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [CDK_DRAG_CONFIG]\n }] }]; }, propDecorators: { connectedTo: [{\n type: Input,\n args: ['cdkDropListConnectedTo']\n }], data: [{\n type: Input,\n args: ['cdkDropListData']\n }], orientation: [{\n type: Input,\n args: ['cdkDropListOrientation']\n }], id: [{\n type: Input\n }], lockAxis: [{\n type: Input,\n args: ['cdkDropListLockAxis']\n }], disabled: [{\n type: Input,\n args: ['cdkDropListDisabled']\n }], sortingDisabled: [{\n type: Input,\n args: ['cdkDropListSortingDisabled']\n }], enterPredicate: [{\n type: Input,\n args: ['cdkDropListEnterPredicate']\n }], sortPredicate: [{\n type: Input,\n args: ['cdkDropListSortPredicate']\n }], autoScrollDisabled: [{\n type: Input,\n args: ['cdkDropListAutoScrollDisabled']\n }], autoScrollStep: [{\n type: Input,\n args: ['cdkDropListAutoScrollStep']\n }], dropped: [{\n type: Output,\n args: ['cdkDropListDropped']\n }], entered: [{\n type: Output,\n args: ['cdkDropListEntered']\n }], exited: [{\n type: Output,\n args: ['cdkDropListExited']\n }], sorted: [{\n type: Output,\n args: ['cdkDropListSorted']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injection token that can be used to reference instances of `CdkDragHandle`. It serves as\n * alternative token to the actual `CdkDragHandle` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DRAG_HANDLE = new InjectionToken('CdkDragHandle');\n/** Handle that can be used to drag a CdkDrag instance. */\nclass CdkDragHandle {\n constructor(element, parentDrag) {\n this.element = element;\n /** Emits when the state of the handle has changed. */\n this._stateChanges = new Subject();\n this._disabled = false;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertElementNode(element.nativeElement, 'cdkDragHandle');\n }\n this._parentDrag = parentDrag;\n }\n /** Whether starting to drag through this handle is disabled. */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n this._stateChanges.next(this);\n }\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n}\nCdkDragHandle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkDragHandle, deps: [{ token: i0.ElementRef }, { token: CDK_DRAG_PARENT, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkDragHandle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkDragHandle, selector: \"[cdkDragHandle]\", inputs: { disabled: [\"cdkDragHandleDisabled\", \"disabled\"] }, host: { classAttribute: \"cdk-drag-handle\" }, providers: [{ provide: CDK_DRAG_HANDLE, useExisting: CdkDragHandle }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkDragHandle, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkDragHandle]',\n host: {\n 'class': 'cdk-drag-handle',\n },\n providers: [{ provide: CDK_DRAG_HANDLE, useExisting: CdkDragHandle }],\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_DRAG_PARENT]\n }, {\n type: Optional\n }, {\n type: SkipSelf\n }] }]; }, propDecorators: { disabled: [{\n type: Input,\n args: ['cdkDragHandleDisabled']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injection token that can be used to reference instances of `CdkDragPlaceholder`. It serves as\n * alternative token to the actual `CdkDragPlaceholder` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DRAG_PLACEHOLDER = new InjectionToken('CdkDragPlaceholder');\n/**\n * Element that will be used as a template for the placeholder of a CdkDrag when\n * it is being dragged. The placeholder is displayed in place of the element being dragged.\n */\nclass CdkDragPlaceholder {\n constructor(templateRef) {\n this.templateRef = templateRef;\n }\n}\nCdkDragPlaceholder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkDragPlaceholder, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkDragPlaceholder.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkDragPlaceholder, selector: \"ng-template[cdkDragPlaceholder]\", inputs: { data: \"data\" }, providers: [{ provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkDragPlaceholder, decorators: [{\n type: Directive,\n args: [{\n selector: 'ng-template[cdkDragPlaceholder]',\n providers: [{ provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder }],\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { data: [{\n type: Input\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injection token that can be used to reference instances of `CdkDragPreview`. It serves as\n * alternative token to the actual `CdkDragPreview` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DRAG_PREVIEW = new InjectionToken('CdkDragPreview');\n/**\n * Element that will be used as a template for the preview\n * of a CdkDrag when it is being dragged.\n */\nclass CdkDragPreview {\n constructor(templateRef) {\n this.templateRef = templateRef;\n this._matchSize = false;\n }\n /** Whether the preview should preserve the same size as the item that is being dragged. */\n get matchSize() {\n return this._matchSize;\n }\n set matchSize(value) {\n this._matchSize = coerceBooleanProperty(value);\n }\n}\nCdkDragPreview.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkDragPreview, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkDragPreview.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkDragPreview, selector: \"ng-template[cdkDragPreview]\", inputs: { data: \"data\", matchSize: \"matchSize\" }, providers: [{ provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkDragPreview, decorators: [{\n type: Directive,\n args: [{\n selector: 'ng-template[cdkDragPreview]',\n providers: [{ provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview }],\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { data: [{\n type: Input\n }], matchSize: [{\n type: Input\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst DRAG_HOST_CLASS = 'cdk-drag';\n/** Element that can be moved inside a CdkDropList container. */\nclass CdkDrag {\n constructor(\n /** Element that the draggable is attached to. */\n element, \n /** Droppable container that the draggable is a part of. */\n dropContainer, \n /**\n * @deprecated `_document` parameter no longer being used and will be removed.\n * @breaking-change 12.0.0\n */\n _document, _ngZone, _viewContainerRef, config, _dir, dragDrop, _changeDetectorRef, _selfHandle, _parentDrag) {\n this.element = element;\n this.dropContainer = dropContainer;\n this._ngZone = _ngZone;\n this._viewContainerRef = _viewContainerRef;\n this._dir = _dir;\n this._changeDetectorRef = _changeDetectorRef;\n this._selfHandle = _selfHandle;\n this._parentDrag = _parentDrag;\n this._destroyed = new Subject();\n /** Emits when the user starts dragging the item. */\n this.started = new EventEmitter();\n /** Emits when the user has released a drag item, before any animations have started. */\n this.released = new EventEmitter();\n /** Emits when the user stops dragging an item in the container. */\n this.ended = new EventEmitter();\n /** Emits when the user has moved the item into a new container. */\n this.entered = new EventEmitter();\n /** Emits when the user removes the item its container by dragging it into another container. */\n this.exited = new EventEmitter();\n /** Emits when the user drops the item inside a container. */\n this.dropped = new EventEmitter();\n /**\n * Emits as the user is dragging the item. Use with caution,\n * because this event will fire for every pixel that the user has dragged.\n */\n this.moved = new Observable((observer) => {\n const subscription = this._dragRef.moved\n .pipe(map(movedEvent => ({\n source: this,\n pointerPosition: movedEvent.pointerPosition,\n event: movedEvent.event,\n delta: movedEvent.delta,\n distance: movedEvent.distance,\n })))\n .subscribe(observer);\n return () => {\n subscription.unsubscribe();\n };\n });\n this._dragRef = dragDrop.createDrag(element, {\n dragStartThreshold: config && config.dragStartThreshold != null ? config.dragStartThreshold : 5,\n pointerDirectionChangeThreshold: config && config.pointerDirectionChangeThreshold != null\n ? config.pointerDirectionChangeThreshold\n : 5,\n zIndex: config?.zIndex,\n });\n this._dragRef.data = this;\n // We have to keep track of the drag instances in order to be able to match an element to\n // a drag instance. We can't go through the global registry of `DragRef`, because the root\n // element could be different.\n CdkDrag._dragInstances.push(this);\n if (config) {\n this._assignDefaults(config);\n }\n // Note that usually the container is assigned when the drop list is picks up the item, but in\n // some cases (mainly transplanted views with OnPush, see #18341) we may end up in a situation\n // where there are no items on the first change detection pass, but the items get picked up as\n // soon as the user triggers another pass by dragging. This is a problem, because the item would\n // have to switch from standalone mode to drag mode in the middle of the dragging sequence which\n // is too late since the two modes save different kinds of information. We work around it by\n // assigning the drop container both from here and the list.\n if (dropContainer) {\n this._dragRef._withDropContainer(dropContainer._dropListRef);\n dropContainer.addItem(this);\n }\n this._syncInputs(this._dragRef);\n this._handleEvents(this._dragRef);\n }\n /** Whether starting to drag this element is disabled. */\n get disabled() {\n return this._disabled || (this.dropContainer && this.dropContainer.disabled);\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n this._dragRef.disabled = this._disabled;\n }\n /**\n * Returns the element that is being used as a placeholder\n * while the current element is being dragged.\n */\n getPlaceholderElement() {\n return this._dragRef.getPlaceholderElement();\n }\n /** Returns the root draggable element. */\n getRootElement() {\n return this._dragRef.getRootElement();\n }\n /** Resets a standalone drag item to its initial position. */\n reset() {\n this._dragRef.reset();\n }\n /**\n * Gets the pixel coordinates of the draggable outside of a drop container.\n */\n getFreeDragPosition() {\n return this._dragRef.getFreeDragPosition();\n }\n /**\n * Sets the current position in pixels the draggable outside of a drop container.\n * @param value New position to be set.\n */\n setFreeDragPosition(value) {\n this._dragRef.setFreeDragPosition(value);\n }\n ngAfterViewInit() {\n // Normally this isn't in the zone, but it can cause major performance regressions for apps\n // using `zone-patch-rxjs` because it'll trigger a change detection when it unsubscribes.\n this._ngZone.runOutsideAngular(() => {\n // We need to wait for the zone to stabilize, in order for the reference\n // element to be in the proper place in the DOM. This is mostly relevant\n // for draggable elements inside portals since they get stamped out in\n // their original DOM position and then they get transferred to the portal.\n this._ngZone.onStable.pipe(take(1), takeUntil(this._destroyed)).subscribe(() => {\n this._updateRootElement();\n this._setupHandlesListener();\n if (this.freeDragPosition) {\n this._dragRef.setFreeDragPosition(this.freeDragPosition);\n }\n });\n });\n }\n ngOnChanges(changes) {\n const rootSelectorChange = changes['rootElementSelector'];\n const positionChange = changes['freeDragPosition'];\n // We don't have to react to the first change since it's being\n // handled in `ngAfterViewInit` where it needs to be deferred.\n if (rootSelectorChange && !rootSelectorChange.firstChange) {\n this._updateRootElement();\n }\n // Skip the first change since it's being handled in `ngAfterViewInit`.\n if (positionChange && !positionChange.firstChange && this.freeDragPosition) {\n this._dragRef.setFreeDragPosition(this.freeDragPosition);\n }\n }\n ngOnDestroy() {\n if (this.dropContainer) {\n this.dropContainer.removeItem(this);\n }\n const index = CdkDrag._dragInstances.indexOf(this);\n if (index > -1) {\n CdkDrag._dragInstances.splice(index, 1);\n }\n // Unnecessary in most cases, but used to avoid extra change detections with `zone-paths-rxjs`.\n this._ngZone.runOutsideAngular(() => {\n this._destroyed.next();\n this._destroyed.complete();\n this._dragRef.dispose();\n });\n }\n /** Syncs the root element with the `DragRef`. */\n _updateRootElement() {\n const element = this.element.nativeElement;\n let rootElement = element;\n if (this.rootElementSelector) {\n rootElement =\n element.closest !== undefined\n ? element.closest(this.rootElementSelector)\n : // Comment tag doesn't have closest method, so use parent's one.\n element.parentElement?.closest(this.rootElementSelector);\n }\n if (rootElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n assertElementNode(rootElement, 'cdkDrag');\n }\n this._dragRef.withRootElement(rootElement || element);\n }\n /** Gets the boundary element, based on the `boundaryElement` value. */\n _getBoundaryElement() {\n const boundary = this.boundaryElement;\n if (!boundary) {\n return null;\n }\n if (typeof boundary === 'string') {\n return this.element.nativeElement.closest(boundary);\n }\n return coerceElement(boundary);\n }\n /** Syncs the inputs of the CdkDrag with the options of the underlying DragRef. */\n _syncInputs(ref) {\n ref.beforeStarted.subscribe(() => {\n if (!ref.isDragging()) {\n const dir = this._dir;\n const dragStartDelay = this.dragStartDelay;\n const placeholder = this._placeholderTemplate\n ? {\n template: this._placeholderTemplate.templateRef,\n context: this._placeholderTemplate.data,\n viewContainer: this._viewContainerRef,\n }\n : null;\n const preview = this._previewTemplate\n ? {\n template: this._previewTemplate.templateRef,\n context: this._previewTemplate.data,\n matchSize: this._previewTemplate.matchSize,\n viewContainer: this._viewContainerRef,\n }\n : null;\n ref.disabled = this.disabled;\n ref.lockAxis = this.lockAxis;\n ref.dragStartDelay =\n typeof dragStartDelay === 'object' && dragStartDelay\n ? dragStartDelay\n : coerceNumberProperty(dragStartDelay);\n ref.constrainPosition = this.constrainPosition;\n ref.previewClass = this.previewClass;\n ref\n .withBoundaryElement(this._getBoundaryElement())\n .withPlaceholderTemplate(placeholder)\n .withPreviewTemplate(preview)\n .withPreviewContainer(this.previewContainer || 'global');\n if (dir) {\n ref.withDirection(dir.value);\n }\n }\n });\n // This only needs to be resolved once.\n ref.beforeStarted.pipe(take(1)).subscribe(() => {\n // If we managed to resolve a parent through DI, use it.\n if (this._parentDrag) {\n ref.withParent(this._parentDrag._dragRef);\n return;\n }\n // Otherwise fall back to resolving the parent by looking up the DOM. This can happen if\n // the item was projected into another item by something like `ngTemplateOutlet`.\n let parent = this.element.nativeElement.parentElement;\n while (parent) {\n if (parent.classList.contains(DRAG_HOST_CLASS)) {\n ref.withParent(CdkDrag._dragInstances.find(drag => {\n return drag.element.nativeElement === parent;\n })?._dragRef || null);\n break;\n }\n parent = parent.parentElement;\n }\n });\n }\n /** Handles the events from the underlying `DragRef`. */\n _handleEvents(ref) {\n ref.started.subscribe(startEvent => {\n this.started.emit({ source: this, event: startEvent.event });\n // Since all of these events run outside of change detection,\n // we need to ensure that everything is marked correctly.\n this._changeDetectorRef.markForCheck();\n });\n ref.released.subscribe(releaseEvent => {\n this.released.emit({ source: this, event: releaseEvent.event });\n });\n ref.ended.subscribe(endEvent => {\n this.ended.emit({\n source: this,\n distance: endEvent.distance,\n dropPoint: endEvent.dropPoint,\n event: endEvent.event,\n });\n // Since all of these events run outside of change detection,\n // we need to ensure that everything is marked correctly.\n this._changeDetectorRef.markForCheck();\n });\n ref.entered.subscribe(enterEvent => {\n this.entered.emit({\n container: enterEvent.container.data,\n item: this,\n currentIndex: enterEvent.currentIndex,\n });\n });\n ref.exited.subscribe(exitEvent => {\n this.exited.emit({\n container: exitEvent.container.data,\n item: this,\n });\n });\n ref.dropped.subscribe(dropEvent => {\n this.dropped.emit({\n previousIndex: dropEvent.previousIndex,\n currentIndex: dropEvent.currentIndex,\n previousContainer: dropEvent.previousContainer.data,\n container: dropEvent.container.data,\n isPointerOverContainer: dropEvent.isPointerOverContainer,\n item: this,\n distance: dropEvent.distance,\n dropPoint: dropEvent.dropPoint,\n event: dropEvent.event,\n });\n });\n }\n /** Assigns the default input values based on a provided config object. */\n _assignDefaults(config) {\n const { lockAxis, dragStartDelay, constrainPosition, previewClass, boundaryElement, draggingDisabled, rootElementSelector, previewContainer, } = config;\n this.disabled = draggingDisabled == null ? false : draggingDisabled;\n this.dragStartDelay = dragStartDelay || 0;\n if (lockAxis) {\n this.lockAxis = lockAxis;\n }\n if (constrainPosition) {\n this.constrainPosition = constrainPosition;\n }\n if (previewClass) {\n this.previewClass = previewClass;\n }\n if (boundaryElement) {\n this.boundaryElement = boundaryElement;\n }\n if (rootElementSelector) {\n this.rootElementSelector = rootElementSelector;\n }\n if (previewContainer) {\n this.previewContainer = previewContainer;\n }\n }\n /** Sets up the listener that syncs the handles with the drag ref. */\n _setupHandlesListener() {\n // Listen for any newly-added handles.\n this._handles.changes\n .pipe(startWith(this._handles), \n // Sync the new handles with the DragRef.\n tap((handles) => {\n const childHandleElements = handles\n .filter(handle => handle._parentDrag === this)\n .map(handle => handle.element);\n // Usually handles are only allowed to be a descendant of the drag element, but if\n // the consumer defined a different drag root, we should allow the drag element\n // itself to be a handle too.\n if (this._selfHandle && this.rootElementSelector) {\n childHandleElements.push(this.element);\n }\n this._dragRef.withHandles(childHandleElements);\n }), \n // Listen if the state of any of the handles changes.\n switchMap((handles) => {\n return merge(...handles.map(item => {\n return item._stateChanges.pipe(startWith(item));\n }));\n }), takeUntil(this._destroyed))\n .subscribe(handleInstance => {\n // Enabled/disable the handle that changed in the DragRef.\n const dragRef = this._dragRef;\n const handle = handleInstance.element.nativeElement;\n handleInstance.disabled ? dragRef.disableHandle(handle) : dragRef.enableHandle(handle);\n });\n }\n}\nCdkDrag._dragInstances = [];\nCdkDrag.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkDrag, deps: [{ token: i0.ElementRef }, { token: CDK_DROP_LIST, optional: true, skipSelf: true }, { token: DOCUMENT }, { token: i0.NgZone }, { token: i0.ViewContainerRef }, { token: CDK_DRAG_CONFIG, optional: true }, { token: i3.Directionality, optional: true }, { token: DragDrop }, { token: i0.ChangeDetectorRef }, { token: CDK_DRAG_HANDLE, optional: true, self: true }, { token: CDK_DRAG_PARENT, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkDrag.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkDrag, selector: \"[cdkDrag]\", inputs: { data: [\"cdkDragData\", \"data\"], lockAxis: [\"cdkDragLockAxis\", \"lockAxis\"], rootElementSelector: [\"cdkDragRootElement\", \"rootElementSelector\"], boundaryElement: [\"cdkDragBoundary\", \"boundaryElement\"], dragStartDelay: [\"cdkDragStartDelay\", \"dragStartDelay\"], freeDragPosition: [\"cdkDragFreeDragPosition\", \"freeDragPosition\"], disabled: [\"cdkDragDisabled\", \"disabled\"], constrainPosition: [\"cdkDragConstrainPosition\", \"constrainPosition\"], previewClass: [\"cdkDragPreviewClass\", \"previewClass\"], previewContainer: [\"cdkDragPreviewContainer\", \"previewContainer\"] }, outputs: { started: \"cdkDragStarted\", released: \"cdkDragReleased\", ended: \"cdkDragEnded\", entered: \"cdkDragEntered\", exited: \"cdkDragExited\", dropped: \"cdkDragDropped\", moved: \"cdkDragMoved\" }, host: { properties: { \"class.cdk-drag-disabled\": \"disabled\", \"class.cdk-drag-dragging\": \"_dragRef.isDragging()\" }, classAttribute: \"cdk-drag\" }, providers: [{ provide: CDK_DRAG_PARENT, useExisting: CdkDrag }], queries: [{ propertyName: \"_previewTemplate\", first: true, predicate: CDK_DRAG_PREVIEW, descendants: true }, { propertyName: \"_placeholderTemplate\", first: true, predicate: CDK_DRAG_PLACEHOLDER, descendants: true }, { propertyName: \"_handles\", predicate: CDK_DRAG_HANDLE, descendants: true }], exportAs: [\"cdkDrag\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkDrag, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkDrag]',\n exportAs: 'cdkDrag',\n host: {\n 'class': DRAG_HOST_CLASS,\n '[class.cdk-drag-disabled]': 'disabled',\n '[class.cdk-drag-dragging]': '_dragRef.isDragging()',\n },\n providers: [{ provide: CDK_DRAG_PARENT, useExisting: CdkDrag }],\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_DROP_LIST]\n }, {\n type: Optional\n }, {\n type: SkipSelf\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.NgZone }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [CDK_DRAG_CONFIG]\n }] }, { type: i3.Directionality, decorators: [{\n type: Optional\n }] }, { type: DragDrop }, { type: i0.ChangeDetectorRef }, { type: CdkDragHandle, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [CDK_DRAG_HANDLE]\n }] }, { type: CdkDrag, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }, {\n type: Inject,\n args: [CDK_DRAG_PARENT]\n }] }]; }, propDecorators: { _handles: [{\n type: ContentChildren,\n args: [CDK_DRAG_HANDLE, { descendants: true }]\n }], _previewTemplate: [{\n type: ContentChild,\n args: [CDK_DRAG_PREVIEW]\n }], _placeholderTemplate: [{\n type: ContentChild,\n args: [CDK_DRAG_PLACEHOLDER]\n }], data: [{\n type: Input,\n args: ['cdkDragData']\n }], lockAxis: [{\n type: Input,\n args: ['cdkDragLockAxis']\n }], rootElementSelector: [{\n type: Input,\n args: ['cdkDragRootElement']\n }], boundaryElement: [{\n type: Input,\n args: ['cdkDragBoundary']\n }], dragStartDelay: [{\n type: Input,\n args: ['cdkDragStartDelay']\n }], freeDragPosition: [{\n type: Input,\n args: ['cdkDragFreeDragPosition']\n }], disabled: [{\n type: Input,\n args: ['cdkDragDisabled']\n }], constrainPosition: [{\n type: Input,\n args: ['cdkDragConstrainPosition']\n }], previewClass: [{\n type: Input,\n args: ['cdkDragPreviewClass']\n }], previewContainer: [{\n type: Input,\n args: ['cdkDragPreviewContainer']\n }], started: [{\n type: Output,\n args: ['cdkDragStarted']\n }], released: [{\n type: Output,\n args: ['cdkDragReleased']\n }], ended: [{\n type: Output,\n args: ['cdkDragEnded']\n }], entered: [{\n type: Output,\n args: ['cdkDragEntered']\n }], exited: [{\n type: Output,\n args: ['cdkDragExited']\n }], dropped: [{\n type: Output,\n args: ['cdkDragDropped']\n }], moved: [{\n type: Output,\n args: ['cdkDragMoved']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass DragDropModule {\n}\nDragDropModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: DragDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nDragDropModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: DragDropModule, declarations: [CdkDropList,\n CdkDropListGroup,\n CdkDrag,\n CdkDragHandle,\n CdkDragPreview,\n CdkDragPlaceholder], exports: [CdkScrollableModule,\n CdkDropList,\n CdkDropListGroup,\n CdkDrag,\n CdkDragHandle,\n CdkDragPreview,\n CdkDragPlaceholder] });\nDragDropModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: DragDropModule, providers: [DragDrop], imports: [CdkScrollableModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: DragDropModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [\n CdkDropList,\n CdkDropListGroup,\n CdkDrag,\n CdkDragHandle,\n CdkDragPreview,\n CdkDragPlaceholder,\n ],\n exports: [\n CdkScrollableModule,\n CdkDropList,\n CdkDropListGroup,\n CdkDrag,\n CdkDragHandle,\n CdkDragPreview,\n CdkDragPlaceholder,\n ],\n providers: [DragDrop],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CDK_DRAG_CONFIG, CDK_DRAG_HANDLE, CDK_DRAG_PARENT, CDK_DRAG_PLACEHOLDER, CDK_DRAG_PREVIEW, CDK_DROP_LIST, CDK_DROP_LIST_GROUP, CdkDrag, CdkDragHandle, CdkDragPlaceholder, CdkDragPreview, CdkDropList, CdkDropListGroup, DragDrop, DragDropModule, DragDropRegistry, DragRef, DropListRef, copyArrayItem, moveItemInArray, transferArrayItem };\n","import { SPACE, BACKSPACE, DELETE, TAB, hasModifierKey, ENTER } from '@angular/cdk/keycodes';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, EventEmitter, Optional, Inject, Attribute, ContentChild, Input, Output, Component, ViewEncapsulation, ChangeDetectionStrategy, Self, ContentChildren, NgModule } from '@angular/core';\nimport * as i3 from '@angular/material/core';\nimport { mixinTabIndex, mixinColor, mixinDisableRipple, RippleRenderer, MAT_RIPPLE_GLOBAL_OPTIONS, mixinErrorState, MatCommonModule, ErrorStateMatcher } from '@angular/material/core';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport * as i1 from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\nimport { Subject, merge } from 'rxjs';\nimport { take, takeUntil, startWith } from 'rxjs/operators';\nimport { FocusKeyManager } from '@angular/cdk/a11y';\nimport * as i1$1 from '@angular/cdk/bidi';\nimport { SelectionModel } from '@angular/cdk/collections';\nimport * as i2 from '@angular/forms';\nimport { Validators } from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\n\n/** Event object emitted by MatChip when selected or deselected. */\nclass MatChipSelectionChange {\n constructor(\n /** Reference to the chip that emitted the event. */\n source, \n /** Whether the chip that emitted the event is selected. */\n selected, \n /** Whether the selection change was a result of a user interaction. */\n isUserInput = false) {\n this.source = source;\n this.selected = selected;\n this.isUserInput = isUserInput;\n }\n}\n/**\n * Injection token that can be used to reference instances of `MatChipRemove`. It serves as\n * alternative token to the actual `MatChipRemove` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_CHIP_REMOVE = new InjectionToken('MatChipRemove');\n/**\n * Injection token that can be used to reference instances of `MatChipAvatar`. It serves as\n * alternative token to the actual `MatChipAvatar` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_CHIP_AVATAR = new InjectionToken('MatChipAvatar');\n/**\n * Injection token that can be used to reference instances of `MatChipTrailingIcon`. It serves as\n * alternative token to the actual `MatChipTrailingIcon` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_CHIP_TRAILING_ICON = new InjectionToken('MatChipTrailingIcon');\n// Boilerplate for applying mixins to MatChip.\n/** @docs-private */\nclass MatChipBase {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n}\nconst _MatChipMixinBase = mixinTabIndex(mixinColor(mixinDisableRipple(MatChipBase), 'primary'), -1);\n/**\n * Dummy directive to add CSS class to chip avatar.\n * @docs-private\n */\nclass MatChipAvatar {\n}\nMatChipAvatar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChipAvatar, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatChipAvatar.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatChipAvatar, selector: \"mat-chip-avatar, [matChipAvatar]\", host: { classAttribute: \"mat-chip-avatar\" }, providers: [{ provide: MAT_CHIP_AVATAR, useExisting: MatChipAvatar }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChipAvatar, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-chip-avatar, [matChipAvatar]',\n host: { 'class': 'mat-chip-avatar' },\n providers: [{ provide: MAT_CHIP_AVATAR, useExisting: MatChipAvatar }],\n }]\n }] });\n/**\n * Dummy directive to add CSS class to chip trailing icon.\n * @docs-private\n */\nclass MatChipTrailingIcon {\n}\nMatChipTrailingIcon.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChipTrailingIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatChipTrailingIcon.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatChipTrailingIcon, selector: \"mat-chip-trailing-icon, [matChipTrailingIcon]\", host: { classAttribute: \"mat-chip-trailing-icon\" }, providers: [{ provide: MAT_CHIP_TRAILING_ICON, useExisting: MatChipTrailingIcon }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChipTrailingIcon, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-chip-trailing-icon, [matChipTrailingIcon]',\n host: { 'class': 'mat-chip-trailing-icon' },\n providers: [{ provide: MAT_CHIP_TRAILING_ICON, useExisting: MatChipTrailingIcon }],\n }]\n }] });\n/** Material Design styled chip directive. Used inside the MatChipList component. */\nclass MatChip extends _MatChipMixinBase {\n constructor(elementRef, _ngZone, platform, globalRippleOptions, _changeDetectorRef, _document, animationMode, tabIndex) {\n super(elementRef);\n this._ngZone = _ngZone;\n this._changeDetectorRef = _changeDetectorRef;\n /** Whether the chip has focus. */\n this._hasFocus = false;\n /** Whether the chip list is selectable */\n this.chipListSelectable = true;\n /** Whether the chip list is in multi-selection mode. */\n this._chipListMultiple = false;\n /** Whether the chip list as a whole is disabled. */\n this._chipListDisabled = false;\n /** ARIA role that should be applied to the chip. */\n this.role = 'option';\n this._selected = false;\n this._selectable = true;\n this._disabled = false;\n this._removable = true;\n /** Emits when the chip is focused. */\n this._onFocus = new Subject();\n /** Emits when the chip is blured. */\n this._onBlur = new Subject();\n /** Emitted when the chip is selected or deselected. */\n this.selectionChange = new EventEmitter();\n /** Emitted when the chip is destroyed. */\n this.destroyed = new EventEmitter();\n /** Emitted when a chip is to be removed. */\n this.removed = new EventEmitter();\n this._addHostClassName();\n // Dynamically create the ripple target, append it within the chip, and use it as the\n // chip's ripple target. Adding the class '.mat-chip-ripple' ensures that it will have\n // the proper styles.\n this._chipRippleTarget = _document.createElement('div');\n this._chipRippleTarget.classList.add('mat-chip-ripple');\n this._elementRef.nativeElement.appendChild(this._chipRippleTarget);\n this._chipRipple = new RippleRenderer(this, _ngZone, this._chipRippleTarget, platform);\n this._chipRipple.setupTriggerEvents(elementRef);\n this.rippleConfig = globalRippleOptions || {};\n this._animationsDisabled = animationMode === 'NoopAnimations';\n this.tabIndex = tabIndex != null ? parseInt(tabIndex) || -1 : -1;\n }\n /**\n * Whether ripples are disabled on interaction\n * @docs-private\n */\n get rippleDisabled() {\n return (this.disabled ||\n this.disableRipple ||\n this._animationsDisabled ||\n !!this.rippleConfig.disabled);\n }\n /** Whether the chip is selected. */\n get selected() {\n return this._selected;\n }\n set selected(value) {\n const coercedValue = coerceBooleanProperty(value);\n if (coercedValue !== this._selected) {\n this._selected = coercedValue;\n this._dispatchSelectionChange();\n }\n }\n /** The value of the chip. Defaults to the content inside `<mat-chip>` tags. */\n get value() {\n return this._value !== undefined ? this._value : this._elementRef.nativeElement.textContent;\n }\n set value(value) {\n this._value = value;\n }\n /**\n * Whether or not the chip is selectable. When a chip is not selectable,\n * changes to its selected state are always ignored. By default a chip is\n * selectable, and it becomes non-selectable if its parent chip list is\n * not selectable.\n */\n get selectable() {\n return this._selectable && this.chipListSelectable;\n }\n set selectable(value) {\n this._selectable = coerceBooleanProperty(value);\n }\n /** Whether the chip is disabled. */\n get disabled() {\n return this._chipListDisabled || this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n }\n /**\n * Determines whether or not the chip displays the remove styling and emits (removed) events.\n */\n get removable() {\n return this._removable;\n }\n set removable(value) {\n this._removable = coerceBooleanProperty(value);\n }\n /** The ARIA selected applied to the chip. */\n get ariaSelected() {\n // Remove the `aria-selected` when the chip is deselected in single-selection mode, because\n // it adds noise to NVDA users where \"not selected\" will be read out for each chip.\n return this.selectable && (this._chipListMultiple || this.selected)\n ? this.selected.toString()\n : null;\n }\n _addHostClassName() {\n const basicChipAttrName = 'mat-basic-chip';\n const element = this._elementRef.nativeElement;\n if (element.hasAttribute(basicChipAttrName) ||\n element.tagName.toLowerCase() === basicChipAttrName) {\n element.classList.add(basicChipAttrName);\n return;\n }\n else {\n element.classList.add('mat-standard-chip');\n }\n }\n ngOnDestroy() {\n this.destroyed.emit({ chip: this });\n this._chipRipple._removeTriggerEvents();\n }\n /** Selects the chip. */\n select() {\n if (!this._selected) {\n this._selected = true;\n this._dispatchSelectionChange();\n this._changeDetectorRef.markForCheck();\n }\n }\n /** Deselects the chip. */\n deselect() {\n if (this._selected) {\n this._selected = false;\n this._dispatchSelectionChange();\n this._changeDetectorRef.markForCheck();\n }\n }\n /** Select this chip and emit selected event */\n selectViaInteraction() {\n if (!this._selected) {\n this._selected = true;\n this._dispatchSelectionChange(true);\n this._changeDetectorRef.markForCheck();\n }\n }\n /** Toggles the current selected state of this chip. */\n toggleSelected(isUserInput = false) {\n this._selected = !this.selected;\n this._dispatchSelectionChange(isUserInput);\n this._changeDetectorRef.markForCheck();\n return this.selected;\n }\n /** Allows for programmatic focusing of the chip. */\n focus() {\n if (!this._hasFocus) {\n this._elementRef.nativeElement.focus();\n this._onFocus.next({ chip: this });\n }\n this._hasFocus = true;\n }\n /**\n * Allows for programmatic removal of the chip. Called by the MatChipList when the DELETE or\n * BACKSPACE keys are pressed.\n *\n * Informs any listeners of the removal request. Does not remove the chip from the DOM.\n */\n remove() {\n if (this.removable) {\n this.removed.emit({ chip: this });\n }\n }\n /** Handles click events on the chip. */\n _handleClick(event) {\n if (this.disabled) {\n event.preventDefault();\n }\n }\n /** Handle custom key presses. */\n _handleKeydown(event) {\n if (this.disabled) {\n return;\n }\n switch (event.keyCode) {\n case DELETE:\n case BACKSPACE:\n // If we are removable, remove the focused chip\n this.remove();\n // Always prevent so page navigation does not occur\n event.preventDefault();\n break;\n case SPACE:\n // If we are selectable, toggle the focused chip\n if (this.selectable) {\n this.toggleSelected(true);\n }\n // Always prevent space from scrolling the page since the list has focus\n event.preventDefault();\n break;\n }\n }\n _blur() {\n // When animations are enabled, Angular may end up removing the chip from the DOM a little\n // earlier than usual, causing it to be blurred and throwing off the logic in the chip list\n // that moves focus not the next item. To work around the issue, we defer marking the chip\n // as not focused until the next time the zone stabilizes.\n this._ngZone.onStable.pipe(take(1)).subscribe(() => {\n this._ngZone.run(() => {\n this._hasFocus = false;\n this._onBlur.next({ chip: this });\n });\n });\n }\n _dispatchSelectionChange(isUserInput = false) {\n this.selectionChange.emit({\n source: this,\n isUserInput,\n selected: this._selected,\n });\n }\n}\nMatChip.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChip, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.Platform }, { token: MAT_RIPPLE_GLOBAL_OPTIONS, optional: true }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatChip.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatChip, selector: \"mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]\", inputs: { color: \"color\", disableRipple: \"disableRipple\", tabIndex: \"tabIndex\", role: \"role\", selected: \"selected\", value: \"value\", selectable: \"selectable\", disabled: \"disabled\", removable: \"removable\" }, outputs: { selectionChange: \"selectionChange\", destroyed: \"destroyed\", removed: \"removed\" }, host: { listeners: { \"click\": \"_handleClick($event)\", \"keydown\": \"_handleKeydown($event)\", \"focus\": \"focus()\", \"blur\": \"_blur()\" }, properties: { \"attr.tabindex\": \"disabled ? null : tabIndex\", \"attr.role\": \"role\", \"class.mat-chip-selected\": \"selected\", \"class.mat-chip-with-avatar\": \"avatar\", \"class.mat-chip-with-trailing-icon\": \"trailingIcon || removeIcon\", \"class.mat-chip-disabled\": \"disabled\", \"class._mat-animation-noopable\": \"_animationsDisabled\", \"attr.disabled\": \"disabled || null\", \"attr.aria-disabled\": \"disabled.toString()\", \"attr.aria-selected\": \"ariaSelected\" }, classAttribute: \"mat-chip mat-focus-indicator\" }, queries: [{ propertyName: \"avatar\", first: true, predicate: MAT_CHIP_AVATAR, descendants: true }, { propertyName: \"trailingIcon\", first: true, predicate: MAT_CHIP_TRAILING_ICON, descendants: true }, { propertyName: \"removeIcon\", first: true, predicate: MAT_CHIP_REMOVE, descendants: true }], exportAs: [\"matChip\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChip, decorators: [{\n type: Directive,\n args: [{\n selector: `mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]`,\n inputs: ['color', 'disableRipple', 'tabIndex'],\n exportAs: 'matChip',\n host: {\n 'class': 'mat-chip mat-focus-indicator',\n '[attr.tabindex]': 'disabled ? null : tabIndex',\n '[attr.role]': 'role',\n '[class.mat-chip-selected]': 'selected',\n '[class.mat-chip-with-avatar]': 'avatar',\n '[class.mat-chip-with-trailing-icon]': 'trailingIcon || removeIcon',\n '[class.mat-chip-disabled]': 'disabled',\n '[class._mat-animation-noopable]': '_animationsDisabled',\n '[attr.disabled]': 'disabled || null',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[attr.aria-selected]': 'ariaSelected',\n '(click)': '_handleClick($event)',\n '(keydown)': '_handleKeydown($event)',\n '(focus)': 'focus()',\n '(blur)': '_blur()',\n },\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.Platform }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_RIPPLE_GLOBAL_OPTIONS]\n }] }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }]; }, propDecorators: { avatar: [{\n type: ContentChild,\n args: [MAT_CHIP_AVATAR]\n }], trailingIcon: [{\n type: ContentChild,\n args: [MAT_CHIP_TRAILING_ICON]\n }], removeIcon: [{\n type: ContentChild,\n args: [MAT_CHIP_REMOVE]\n }], role: [{\n type: Input\n }], selected: [{\n type: Input\n }], value: [{\n type: Input\n }], selectable: [{\n type: Input\n }], disabled: [{\n type: Input\n }], removable: [{\n type: Input\n }], selectionChange: [{\n type: Output\n }], destroyed: [{\n type: Output\n }], removed: [{\n type: Output\n }] } });\n/**\n * Applies proper (click) support and adds styling for use with the Material Design \"cancel\" icon\n * available at https://material.io/icons/#ic_cancel.\n *\n * Example:\n *\n * `<mat-chip>\n * <mat-icon matChipRemove>cancel</mat-icon>\n * </mat-chip>`\n *\n * You *may* use a custom icon, but you may need to override the `mat-chip-remove` positioning\n * styles to properly center the icon within the chip.\n */\nclass MatChipRemove {\n constructor(_parentChip, elementRef) {\n this._parentChip = _parentChip;\n if (elementRef.nativeElement.nodeName === 'BUTTON') {\n elementRef.nativeElement.setAttribute('type', 'button');\n }\n }\n /** Calls the parent chip's public `remove()` method if applicable. */\n _handleClick(event) {\n const parentChip = this._parentChip;\n if (parentChip.removable && !parentChip.disabled) {\n parentChip.remove();\n }\n // We need to stop event propagation because otherwise the event will bubble up to the\n // form field and cause the `onContainerClick` method to be invoked. This method would then\n // reset the focused chip that has been focused after chip removal. Usually the parent\n // the parent click listener of the `MatChip` would prevent propagation, but it can happen\n // that the chip is being removed before the event bubbles up.\n event.stopPropagation();\n event.preventDefault();\n }\n}\nMatChipRemove.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChipRemove, deps: [{ token: MatChip }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nMatChipRemove.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatChipRemove, selector: \"[matChipRemove]\", host: { listeners: { \"click\": \"_handleClick($event)\" }, classAttribute: \"mat-chip-remove mat-chip-trailing-icon\" }, providers: [{ provide: MAT_CHIP_REMOVE, useExisting: MatChipRemove }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChipRemove, decorators: [{\n type: Directive,\n args: [{\n selector: '[matChipRemove]',\n host: {\n 'class': 'mat-chip-remove mat-chip-trailing-icon',\n '(click)': '_handleClick($event)',\n },\n providers: [{ provide: MAT_CHIP_REMOVE, useExisting: MatChipRemove }],\n }]\n }], ctorParameters: function () { return [{ type: MatChip }, { type: i0.ElementRef }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token to be used to override the default options for the chips module. */\nconst MAT_CHIPS_DEFAULT_OPTIONS = new InjectionToken('mat-chips-default-options');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Boilerplate for applying mixins to MatChipList.\n/** @docs-private */\nconst _MatChipListBase = mixinErrorState(class {\n constructor(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, \n /**\n * Form control bound to the component.\n * Implemented as part of `MatFormFieldControl`.\n * @docs-private\n */\n ngControl) {\n this._defaultErrorStateMatcher = _defaultErrorStateMatcher;\n this._parentForm = _parentForm;\n this._parentFormGroup = _parentFormGroup;\n this.ngControl = ngControl;\n /**\n * Emits whenever the component state changes and should cause the parent\n * form-field to update. Implemented as part of `MatFormFieldControl`.\n * @docs-private\n */\n this.stateChanges = new Subject();\n }\n});\n// Increasing integer for generating unique ids for chip-list components.\nlet nextUniqueId$1 = 0;\n/** Change event object that is emitted when the chip list value has changed. */\nclass MatChipListChange {\n constructor(\n /** Chip list that emitted the event. */\n source, \n /** Value of the chip list when the event was emitted. */\n value) {\n this.source = source;\n this.value = value;\n }\n}\n/**\n * A material design chips component (named ChipList for its similarity to the List component).\n */\nclass MatChipList extends _MatChipListBase {\n constructor(_elementRef, _changeDetectorRef, _dir, _parentForm, _parentFormGroup, _defaultErrorStateMatcher, ngControl) {\n super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl);\n this._elementRef = _elementRef;\n this._changeDetectorRef = _changeDetectorRef;\n this._dir = _dir;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n this.controlType = 'mat-chip-list';\n /**\n * When a chip is destroyed, we store the index of the destroyed chip until the chips\n * query list notifies about the update. This is necessary because we cannot determine an\n * appropriate chip that should receive focus until the array of chips updated completely.\n */\n this._lastDestroyedChipIndex = null;\n /** Subject that emits when the component has been destroyed. */\n this._destroyed = new Subject();\n /** Uid of the chip list */\n this._uid = `mat-chip-list-${nextUniqueId$1++}`;\n /** Tab index for the chip list. */\n this._tabIndex = 0;\n /**\n * User defined tab index.\n * When it is not null, use user defined tab index. Otherwise use _tabIndex\n */\n this._userTabIndex = null;\n /** Function when touched */\n this._onTouched = () => { };\n /** Function when changed */\n this._onChange = () => { };\n this._multiple = false;\n this._compareWith = (o1, o2) => o1 === o2;\n this._disabled = false;\n /** Orientation of the chip list. */\n this.ariaOrientation = 'horizontal';\n this._selectable = true;\n /** Event emitted when the selected chip list value has been changed by the user. */\n this.change = new EventEmitter();\n /**\n * Event that emits whenever the raw value of the chip-list changes. This is here primarily\n * to facilitate the two-way binding for the `value` input.\n * @docs-private\n */\n this.valueChange = new EventEmitter();\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n /** The array of selected chips inside chip list. */\n get selected() {\n return this.multiple ? this._selectionModel?.selected || [] : this._selectionModel?.selected[0];\n }\n /** The ARIA role applied to the chip list. */\n get role() {\n if (this._explicitRole) {\n return this._explicitRole;\n }\n return this.empty ? null : 'listbox';\n }\n set role(role) {\n this._explicitRole = role;\n }\n /** Whether the user should be allowed to select multiple chips. */\n get multiple() {\n return this._multiple;\n }\n set multiple(value) {\n this._multiple = coerceBooleanProperty(value);\n this._syncChipsState();\n }\n /**\n * A function to compare the option values with the selected values. The first argument\n * is a value from an option. The second is a value from the selection. A boolean\n * should be returned.\n */\n get compareWith() {\n return this._compareWith;\n }\n set compareWith(fn) {\n this._compareWith = fn;\n if (this._selectionModel) {\n // A different comparator means the selection could change.\n this._initializeSelection();\n }\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get value() {\n return this._value;\n }\n set value(value) {\n this.writeValue(value);\n this._value = value;\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get id() {\n return this._chipInput ? this._chipInput.id : this._uid;\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get required() {\n return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get placeholder() {\n return this._chipInput ? this._chipInput.placeholder : this._placeholder;\n }\n set placeholder(value) {\n this._placeholder = value;\n this.stateChanges.next();\n }\n /** Whether any chips or the matChipInput inside of this chip-list has focus. */\n get focused() {\n return (this._chipInput && this._chipInput.focused) || this._hasFocusedChip();\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get empty() {\n return (!this._chipInput || this._chipInput.empty) && (!this.chips || this.chips.length === 0);\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldLabelFloat() {\n return !this.empty || this.focused;\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get disabled() {\n return this.ngControl ? !!this.ngControl.disabled : this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n this._syncChipsState();\n }\n /**\n * Whether or not this chip list is selectable. When a chip list is not selectable,\n * the selected states for all the chips inside the chip list are always ignored.\n */\n get selectable() {\n return this._selectable;\n }\n set selectable(value) {\n this._selectable = coerceBooleanProperty(value);\n if (this.chips) {\n this.chips.forEach(chip => (chip.chipListSelectable = this._selectable));\n }\n }\n set tabIndex(value) {\n this._userTabIndex = value;\n this._tabIndex = value;\n }\n /** Combined stream of all of the child chips' selection change events. */\n get chipSelectionChanges() {\n return merge(...this.chips.map(chip => chip.selectionChange));\n }\n /** Combined stream of all of the child chips' focus change events. */\n get chipFocusChanges() {\n return merge(...this.chips.map(chip => chip._onFocus));\n }\n /** Combined stream of all of the child chips' blur change events. */\n get chipBlurChanges() {\n return merge(...this.chips.map(chip => chip._onBlur));\n }\n /** Combined stream of all of the child chips' remove change events. */\n get chipRemoveChanges() {\n return merge(...this.chips.map(chip => chip.destroyed));\n }\n ngAfterContentInit() {\n this._keyManager = new FocusKeyManager(this.chips)\n .withWrap()\n .withVerticalOrientation()\n .withHomeAndEnd()\n .withHorizontalOrientation(this._dir ? this._dir.value : 'ltr');\n if (this._dir) {\n this._dir.change\n .pipe(takeUntil(this._destroyed))\n .subscribe(dir => this._keyManager.withHorizontalOrientation(dir));\n }\n this._keyManager.tabOut.pipe(takeUntil(this._destroyed)).subscribe(() => {\n this._allowFocusEscape();\n });\n // When the list changes, re-subscribe\n this.chips.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => {\n if (this.disabled) {\n // Since this happens after the content has been\n // checked, we need to defer it to the next tick.\n Promise.resolve().then(() => {\n this._syncChipsState();\n });\n }\n this._resetChips();\n // Reset chips selected/deselected status\n this._initializeSelection();\n // Check to see if we need to update our tab index\n this._updateTabIndex();\n // Check to see if we have a destroyed chip and need to refocus\n this._updateFocusForDestroyedChips();\n this.stateChanges.next();\n });\n }\n ngOnInit() {\n this._selectionModel = new SelectionModel(this.multiple, undefined, false);\n this.stateChanges.next();\n }\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n if (this.ngControl.disabled !== this._disabled) {\n this.disabled = !!this.ngControl.disabled;\n }\n }\n }\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n this.stateChanges.complete();\n this._dropSubscriptions();\n }\n /** Associates an HTML input element with this chip list. */\n registerInput(inputElement) {\n this._chipInput = inputElement;\n // We use this attribute to match the chip list to its input in test harnesses.\n // Set the attribute directly here to avoid \"changed after checked\" errors.\n this._elementRef.nativeElement.setAttribute('data-mat-chip-input', inputElement.id);\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids) {\n if (ids.length) {\n this._elementRef.nativeElement.setAttribute('aria-describedby', ids.join(' '));\n }\n else {\n this._elementRef.nativeElement.removeAttribute('aria-describedby');\n }\n }\n // Implemented as part of ControlValueAccessor.\n writeValue(value) {\n if (this.chips) {\n this._setSelectionByValue(value, false);\n }\n }\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn) {\n this._onChange = fn;\n }\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn) {\n this._onTouched = fn;\n }\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n this.stateChanges.next();\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick(event) {\n if (!this._originatesFromChip(event)) {\n this.focus();\n }\n }\n /**\n * Focuses the first non-disabled chip in this chip list, or the associated input when there\n * are no eligible chips.\n */\n focus(options) {\n if (this.disabled) {\n return;\n }\n // TODO: ARIA says this should focus the first `selected` chip if any are selected.\n // Focus on first element if there's no chipInput inside chip-list\n if (this._chipInput && this._chipInput.focused) {\n // do nothing\n }\n else if (this.chips.length > 0) {\n this._keyManager.setFirstItemActive();\n this.stateChanges.next();\n }\n else {\n this._focusInput(options);\n this.stateChanges.next();\n }\n }\n /** Attempt to focus an input if we have one. */\n _focusInput(options) {\n if (this._chipInput) {\n this._chipInput.focus(options);\n }\n }\n /**\n * Pass events to the keyboard manager. Available here for tests.\n */\n _keydown(event) {\n const target = event.target;\n if (target && target.classList.contains('mat-chip')) {\n this._keyManager.onKeydown(event);\n this.stateChanges.next();\n }\n }\n /**\n * Check the tab index as you should not be allowed to focus an empty list.\n */\n _updateTabIndex() {\n // If we have 0 chips, we should not allow keyboard focus\n this._tabIndex = this._userTabIndex || (this.chips.length === 0 ? -1 : 0);\n }\n /**\n * If the amount of chips changed, we need to update the\n * key manager state and focus the next closest chip.\n */\n _updateFocusForDestroyedChips() {\n // Move focus to the closest chip. If no other chips remain, focus the chip-list itself.\n if (this._lastDestroyedChipIndex != null) {\n if (this.chips.length) {\n const newChipIndex = Math.min(this._lastDestroyedChipIndex, this.chips.length - 1);\n this._keyManager.setActiveItem(newChipIndex);\n }\n else {\n this.focus();\n }\n }\n this._lastDestroyedChipIndex = null;\n }\n /**\n * Utility to ensure all indexes are valid.\n *\n * @param index The index to be checked.\n * @returns True if the index is valid for our list of chips.\n */\n _isValidIndex(index) {\n return index >= 0 && index < this.chips.length;\n }\n _setSelectionByValue(value, isUserInput = true) {\n this._clearSelection();\n this.chips.forEach(chip => chip.deselect());\n if (Array.isArray(value)) {\n value.forEach(currentValue => this._selectValue(currentValue, isUserInput));\n this._sortValues();\n }\n else {\n const correspondingChip = this._selectValue(value, isUserInput);\n // Shift focus to the active item. Note that we shouldn't do this in multiple\n // mode, because we don't know what chip the user interacted with last.\n if (correspondingChip) {\n if (isUserInput) {\n this._keyManager.setActiveItem(correspondingChip);\n }\n }\n }\n }\n /**\n * Finds and selects the chip based on its value.\n * @returns Chip that has the corresponding value.\n */\n _selectValue(value, isUserInput = true) {\n const correspondingChip = this.chips.find(chip => {\n return chip.value != null && this._compareWith(chip.value, value);\n });\n if (correspondingChip) {\n isUserInput ? correspondingChip.selectViaInteraction() : correspondingChip.select();\n this._selectionModel.select(correspondingChip);\n }\n return correspondingChip;\n }\n _initializeSelection() {\n // Defer setting the value in order to avoid the \"Expression\n // has changed after it was checked\" errors from Angular.\n Promise.resolve().then(() => {\n if (this.ngControl || this._value) {\n this._setSelectionByValue(this.ngControl ? this.ngControl.value : this._value, false);\n this.stateChanges.next();\n }\n });\n }\n /**\n * Deselects every chip in the list.\n * @param skip Chip that should not be deselected.\n */\n _clearSelection(skip) {\n this._selectionModel.clear();\n this.chips.forEach(chip => {\n if (chip !== skip) {\n chip.deselect();\n }\n });\n this.stateChanges.next();\n }\n /**\n * Sorts the model values, ensuring that they keep the same\n * order that they have in the panel.\n */\n _sortValues() {\n if (this._multiple) {\n this._selectionModel.clear();\n this.chips.forEach(chip => {\n if (chip.selected) {\n this._selectionModel.select(chip);\n }\n });\n this.stateChanges.next();\n }\n }\n /** Emits change event to set the model value. */\n _propagateChanges(fallbackValue) {\n let valueToEmit = null;\n if (Array.isArray(this.selected)) {\n valueToEmit = this.selected.map(chip => chip.value);\n }\n else {\n valueToEmit = this.selected ? this.selected.value : fallbackValue;\n }\n this._value = valueToEmit;\n this.change.emit(new MatChipListChange(this, valueToEmit));\n this.valueChange.emit(valueToEmit);\n this._onChange(valueToEmit);\n this._changeDetectorRef.markForCheck();\n }\n /** When blurred, mark the field as touched when focus moved outside the chip list. */\n _blur() {\n if (!this._hasFocusedChip()) {\n this._keyManager.setActiveItem(-1);\n }\n if (!this.disabled) {\n if (this._chipInput) {\n // If there's a chip input, we should check whether the focus moved to chip input.\n // If the focus is not moved to chip input, mark the field as touched. If the focus moved\n // to chip input, do nothing.\n // Timeout is needed to wait for the focus() event trigger on chip input.\n setTimeout(() => {\n if (!this.focused) {\n this._markAsTouched();\n }\n });\n }\n else {\n // If there's no chip input, then mark the field as touched.\n this._markAsTouched();\n }\n }\n }\n /** Mark the field as touched */\n _markAsTouched() {\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n this.stateChanges.next();\n }\n /**\n * Removes the `tabindex` from the chip list and resets it back afterwards, allowing the\n * user to tab out of it. This prevents the list from capturing focus and redirecting\n * it back to the first chip, creating a focus trap, if it user tries to tab away.\n */\n _allowFocusEscape() {\n if (this._tabIndex !== -1) {\n this._tabIndex = -1;\n setTimeout(() => {\n this._tabIndex = this._userTabIndex || 0;\n this._changeDetectorRef.markForCheck();\n });\n }\n }\n _resetChips() {\n this._dropSubscriptions();\n this._listenToChipsFocus();\n this._listenToChipsSelection();\n this._listenToChipsRemoved();\n }\n _dropSubscriptions() {\n if (this._chipFocusSubscription) {\n this._chipFocusSubscription.unsubscribe();\n this._chipFocusSubscription = null;\n }\n if (this._chipBlurSubscription) {\n this._chipBlurSubscription.unsubscribe();\n this._chipBlurSubscription = null;\n }\n if (this._chipSelectionSubscription) {\n this._chipSelectionSubscription.unsubscribe();\n this._chipSelectionSubscription = null;\n }\n if (this._chipRemoveSubscription) {\n this._chipRemoveSubscription.unsubscribe();\n this._chipRemoveSubscription = null;\n }\n }\n /** Listens to user-generated selection events on each chip. */\n _listenToChipsSelection() {\n this._chipSelectionSubscription = this.chipSelectionChanges.subscribe(event => {\n event.source.selected\n ? this._selectionModel.select(event.source)\n : this._selectionModel.deselect(event.source);\n // For single selection chip list, make sure the deselected value is unselected.\n if (!this.multiple) {\n this.chips.forEach(chip => {\n if (!this._selectionModel.isSelected(chip) && chip.selected) {\n chip.deselect();\n }\n });\n }\n if (event.isUserInput) {\n this._propagateChanges();\n }\n });\n }\n /** Listens to user-generated selection events on each chip. */\n _listenToChipsFocus() {\n this._chipFocusSubscription = this.chipFocusChanges.subscribe(event => {\n let chipIndex = this.chips.toArray().indexOf(event.chip);\n if (this._isValidIndex(chipIndex)) {\n this._keyManager.updateActiveItem(chipIndex);\n }\n this.stateChanges.next();\n });\n this._chipBlurSubscription = this.chipBlurChanges.subscribe(() => {\n this._blur();\n this.stateChanges.next();\n });\n }\n _listenToChipsRemoved() {\n this._chipRemoveSubscription = this.chipRemoveChanges.subscribe(event => {\n const chip = event.chip;\n const chipIndex = this.chips.toArray().indexOf(event.chip);\n // In case the chip that will be removed is currently focused, we temporarily store\n // the index in order to be able to determine an appropriate sibling chip that will\n // receive focus.\n if (this._isValidIndex(chipIndex) && chip._hasFocus) {\n this._lastDestroyedChipIndex = chipIndex;\n }\n });\n }\n /** Checks whether an event comes from inside a chip element. */\n _originatesFromChip(event) {\n let currentElement = event.target;\n while (currentElement && currentElement !== this._elementRef.nativeElement) {\n if (currentElement.classList.contains('mat-chip')) {\n return true;\n }\n currentElement = currentElement.parentElement;\n }\n return false;\n }\n /** Checks whether any of the chips is focused. */\n _hasFocusedChip() {\n return this.chips && this.chips.some(chip => chip._hasFocus);\n }\n /** Syncs the list's state with the individual chips. */\n _syncChipsState() {\n if (this.chips) {\n this.chips.forEach(chip => {\n chip._chipListDisabled = this._disabled;\n chip._chipListMultiple = this.multiple;\n });\n }\n }\n}\nMatChipList.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChipList, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$1.Directionality, optional: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i3.ErrorStateMatcher }, { token: i2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });\nMatChipList.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatChipList, selector: \"mat-chip-list\", inputs: { role: \"role\", userAriaDescribedBy: [\"aria-describedby\", \"userAriaDescribedBy\"], errorStateMatcher: \"errorStateMatcher\", multiple: \"multiple\", compareWith: \"compareWith\", value: \"value\", required: \"required\", placeholder: \"placeholder\", disabled: \"disabled\", ariaOrientation: [\"aria-orientation\", \"ariaOrientation\"], selectable: \"selectable\", tabIndex: \"tabIndex\" }, outputs: { change: \"change\", valueChange: \"valueChange\" }, host: { listeners: { \"focus\": \"focus()\", \"blur\": \"_blur()\", \"keydown\": \"_keydown($event)\" }, properties: { \"attr.tabindex\": \"disabled ? null : _tabIndex\", \"attr.aria-required\": \"role ? required : null\", \"attr.aria-disabled\": \"disabled.toString()\", \"attr.aria-invalid\": \"errorState\", \"attr.aria-multiselectable\": \"multiple\", \"attr.role\": \"role\", \"class.mat-chip-list-disabled\": \"disabled\", \"class.mat-chip-list-invalid\": \"errorState\", \"class.mat-chip-list-required\": \"required\", \"attr.aria-orientation\": \"ariaOrientation\", \"id\": \"_uid\" }, classAttribute: \"mat-chip-list\" }, providers: [{ provide: MatFormFieldControl, useExisting: MatChipList }], queries: [{ propertyName: \"chips\", predicate: MatChip, descendants: true }], exportAs: [\"matChipList\"], usesInheritance: true, ngImport: i0, template: `<div class=\"mat-chip-list-wrapper\"><ng-content></ng-content></div>`, isInline: true, styles: [\".mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}.mat-standard-chip._mat-animation-noopable{transition:none !important;animation:none !important}.mat-standard-chip .mat-chip-remove{border:none;-webkit-appearance:none;-moz-appearance:none;padding:0;background:none}.mat-standard-chip .mat-chip-remove.mat-icon,.mat-standard-chip .mat-chip-remove .mat-icon{width:18px;height:18px;font-size:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:\\\"\\\";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.cdk-high-contrast-active .mat-standard-chip.mat-chip-selected{outline-width:3px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden;transform:translateZ(0)}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChipList, decorators: [{\n type: Component,\n args: [{ selector: 'mat-chip-list', template: `<div class=\"mat-chip-list-wrapper\"><ng-content></ng-content></div>`, exportAs: 'matChipList', host: {\n '[attr.tabindex]': 'disabled ? null : _tabIndex',\n '[attr.aria-required]': 'role ? required : null',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[attr.aria-invalid]': 'errorState',\n '[attr.aria-multiselectable]': 'multiple',\n '[attr.role]': 'role',\n '[class.mat-chip-list-disabled]': 'disabled',\n '[class.mat-chip-list-invalid]': 'errorState',\n '[class.mat-chip-list-required]': 'required',\n '[attr.aria-orientation]': 'ariaOrientation',\n 'class': 'mat-chip-list',\n '(focus)': 'focus()',\n '(blur)': '_blur()',\n '(keydown)': '_keydown($event)',\n '[id]': '_uid',\n }, providers: [{ provide: MatFormFieldControl, useExisting: MatChipList }], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}.mat-standard-chip._mat-animation-noopable{transition:none !important;animation:none !important}.mat-standard-chip .mat-chip-remove{border:none;-webkit-appearance:none;-moz-appearance:none;padding:0;background:none}.mat-standard-chip .mat-chip-remove.mat-icon,.mat-standard-chip .mat-chip-remove .mat-icon{width:18px;height:18px;font-size:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:\\\"\\\";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.cdk-high-contrast-active .mat-standard-chip.mat-chip-selected{outline-width:3px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden;transform:translateZ(0)}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$1.Directionality, decorators: [{\n type: Optional\n }] }, { type: i2.NgForm, decorators: [{\n type: Optional\n }] }, { type: i2.FormGroupDirective, decorators: [{\n type: Optional\n }] }, { type: i3.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{\n type: Optional\n }, {\n type: Self\n }] }]; }, propDecorators: { role: [{\n type: Input\n }], userAriaDescribedBy: [{\n type: Input,\n args: ['aria-describedby']\n }], errorStateMatcher: [{\n type: Input\n }], multiple: [{\n type: Input\n }], compareWith: [{\n type: Input\n }], value: [{\n type: Input\n }], required: [{\n type: Input\n }], placeholder: [{\n type: Input\n }], disabled: [{\n type: Input\n }], ariaOrientation: [{\n type: Input,\n args: ['aria-orientation']\n }], selectable: [{\n type: Input\n }], tabIndex: [{\n type: Input\n }], change: [{\n type: Output\n }], valueChange: [{\n type: Output\n }], chips: [{\n type: ContentChildren,\n args: [MatChip, {\n // We need to use `descendants: true`, because Ivy will no longer match\n // indirect descendants if it's left as false.\n descendants: true,\n }]\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Increasing integer for generating unique ids.\nlet nextUniqueId = 0;\n/**\n * Directive that adds chip-specific behaviors to an input element inside `<mat-form-field>`.\n * May be placed inside or outside of an `<mat-chip-list>`.\n */\nclass MatChipInput {\n constructor(_elementRef, _defaultOptions) {\n this._elementRef = _elementRef;\n this._defaultOptions = _defaultOptions;\n /** Whether the control is focused. */\n this.focused = false;\n this._addOnBlur = false;\n /**\n * The list of key codes that will trigger a chipEnd event.\n *\n * Defaults to `[ENTER]`.\n */\n this.separatorKeyCodes = this._defaultOptions.separatorKeyCodes;\n /** Emitted when a chip is to be added. */\n this.chipEnd = new EventEmitter();\n /** The input's placeholder text. */\n this.placeholder = '';\n /** Unique id for the input. */\n this.id = `mat-chip-list-input-${nextUniqueId++}`;\n this._disabled = false;\n this.inputElement = this._elementRef.nativeElement;\n }\n /** Register input for chip list */\n set chipList(value) {\n if (value) {\n this._chipList = value;\n this._chipList.registerInput(this);\n }\n }\n /**\n * Whether or not the chipEnd event will be emitted when the input is blurred.\n */\n get addOnBlur() {\n return this._addOnBlur;\n }\n set addOnBlur(value) {\n this._addOnBlur = coerceBooleanProperty(value);\n }\n /** Whether the input is disabled. */\n get disabled() {\n return this._disabled || (this._chipList && this._chipList.disabled);\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n }\n /** Whether the input is empty. */\n get empty() {\n return !this.inputElement.value;\n }\n ngOnChanges() {\n this._chipList.stateChanges.next();\n }\n ngOnDestroy() {\n this.chipEnd.complete();\n }\n ngAfterContentInit() {\n this._focusLastChipOnBackspace = this.empty;\n }\n /** Utility method to make host definition/tests more clear. */\n _keydown(event) {\n if (event) {\n // Allow the user's focus to escape when they're tabbing forward. Note that we don't\n // want to do this when going backwards, because focus should go back to the first chip.\n if (event.keyCode === TAB && !hasModifierKey(event, 'shiftKey')) {\n this._chipList._allowFocusEscape();\n }\n // To prevent the user from accidentally deleting chips when pressing BACKSPACE continuously,\n // We focus the last chip on backspace only after the user has released the backspace button,\n // and the input is empty (see behaviour in _keyup)\n if (event.keyCode === BACKSPACE && this._focusLastChipOnBackspace) {\n this._chipList._keyManager.setLastItemActive();\n event.preventDefault();\n return;\n }\n else {\n this._focusLastChipOnBackspace = false;\n }\n }\n this._emitChipEnd(event);\n }\n /**\n * Pass events to the keyboard manager. Available here for tests.\n */\n _keyup(event) {\n // Allow user to move focus to chips next time he presses backspace\n if (!this._focusLastChipOnBackspace && event.keyCode === BACKSPACE && this.empty) {\n this._focusLastChipOnBackspace = true;\n event.preventDefault();\n }\n }\n /** Checks to see if the blur should emit the (chipEnd) event. */\n _blur() {\n if (this.addOnBlur) {\n this._emitChipEnd();\n }\n this.focused = false;\n // Blur the chip list if it is not focused\n if (!this._chipList.focused) {\n this._chipList._blur();\n }\n this._chipList.stateChanges.next();\n }\n _focus() {\n this.focused = true;\n this._focusLastChipOnBackspace = this.empty;\n this._chipList.stateChanges.next();\n }\n /** Checks to see if the (chipEnd) event needs to be emitted. */\n _emitChipEnd(event) {\n if (!this.inputElement.value && !!event) {\n this._chipList._keydown(event);\n }\n if (!event || this._isSeparatorKey(event)) {\n this.chipEnd.emit({\n input: this.inputElement,\n value: this.inputElement.value,\n chipInput: this,\n });\n event?.preventDefault();\n }\n }\n _onInput() {\n // Let chip list know whenever the value changes.\n this._chipList.stateChanges.next();\n }\n /** Focuses the input. */\n focus(options) {\n this.inputElement.focus(options);\n }\n /** Clears the input */\n clear() {\n this.inputElement.value = '';\n this._focusLastChipOnBackspace = true;\n }\n /** Checks whether a keycode is one of the configured separators. */\n _isSeparatorKey(event) {\n return !hasModifierKey(event) && new Set(this.separatorKeyCodes).has(event.keyCode);\n }\n}\nMatChipInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChipInput, deps: [{ token: i0.ElementRef }, { token: MAT_CHIPS_DEFAULT_OPTIONS }], target: i0.ɵɵFactoryTarget.Directive });\nMatChipInput.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatChipInput, selector: \"input[matChipInputFor]\", inputs: { chipList: [\"matChipInputFor\", \"chipList\"], addOnBlur: [\"matChipInputAddOnBlur\", \"addOnBlur\"], separatorKeyCodes: [\"matChipInputSeparatorKeyCodes\", \"separatorKeyCodes\"], placeholder: \"placeholder\", id: \"id\", disabled: \"disabled\" }, outputs: { chipEnd: \"matChipInputTokenEnd\" }, host: { listeners: { \"keydown\": \"_keydown($event)\", \"keyup\": \"_keyup($event)\", \"blur\": \"_blur()\", \"focus\": \"_focus()\", \"input\": \"_onInput()\" }, properties: { \"id\": \"id\", \"attr.disabled\": \"disabled || null\", \"attr.placeholder\": \"placeholder || null\", \"attr.aria-invalid\": \"_chipList && _chipList.ngControl ? _chipList.ngControl.invalid : null\", \"attr.aria-required\": \"_chipList && _chipList.required || null\" }, classAttribute: \"mat-chip-input mat-input-element\" }, exportAs: [\"matChipInput\", \"matChipInputFor\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChipInput, decorators: [{\n type: Directive,\n args: [{\n selector: 'input[matChipInputFor]',\n exportAs: 'matChipInput, matChipInputFor',\n host: {\n 'class': 'mat-chip-input mat-input-element',\n '(keydown)': '_keydown($event)',\n '(keyup)': '_keyup($event)',\n '(blur)': '_blur()',\n '(focus)': '_focus()',\n '(input)': '_onInput()',\n '[id]': 'id',\n '[attr.disabled]': 'disabled || null',\n '[attr.placeholder]': 'placeholder || null',\n '[attr.aria-invalid]': '_chipList && _chipList.ngControl ? _chipList.ngControl.invalid : null',\n '[attr.aria-required]': '_chipList && _chipList.required || null',\n },\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_CHIPS_DEFAULT_OPTIONS]\n }] }]; }, propDecorators: { chipList: [{\n type: Input,\n args: ['matChipInputFor']\n }], addOnBlur: [{\n type: Input,\n args: ['matChipInputAddOnBlur']\n }], separatorKeyCodes: [{\n type: Input,\n args: ['matChipInputSeparatorKeyCodes']\n }], chipEnd: [{\n type: Output,\n args: ['matChipInputTokenEnd']\n }], placeholder: [{\n type: Input\n }], id: [{\n type: Input\n }], disabled: [{\n type: Input\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst CHIP_DECLARATIONS = [\n MatChipList,\n MatChip,\n MatChipInput,\n MatChipRemove,\n MatChipAvatar,\n MatChipTrailingIcon,\n];\nclass MatChipsModule {\n}\nMatChipsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChipsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatChipsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChipsModule, declarations: [MatChipList,\n MatChip,\n MatChipInput,\n MatChipRemove,\n MatChipAvatar,\n MatChipTrailingIcon], imports: [MatCommonModule], exports: [MatChipList,\n MatChip,\n MatChipInput,\n MatChipRemove,\n MatChipAvatar,\n MatChipTrailingIcon] });\nMatChipsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChipsModule, providers: [\n ErrorStateMatcher,\n {\n provide: MAT_CHIPS_DEFAULT_OPTIONS,\n useValue: {\n separatorKeyCodes: [ENTER],\n },\n },\n ], imports: [MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatChipsModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [MatCommonModule],\n exports: CHIP_DECLARATIONS,\n declarations: CHIP_DECLARATIONS,\n providers: [\n ErrorStateMatcher,\n {\n provide: MAT_CHIPS_DEFAULT_OPTIONS,\n useValue: {\n separatorKeyCodes: [ENTER],\n },\n },\n ],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_CHIPS_DEFAULT_OPTIONS, MAT_CHIP_AVATAR, MAT_CHIP_REMOVE, MAT_CHIP_TRAILING_ICON, MatChip, MatChipAvatar, MatChipInput, MatChipList, MatChipListChange, MatChipRemove, MatChipSelectionChange, MatChipTrailingIcon, MatChipsModule };\n"],"names":["asyncScheduler","timer","interval","period","scheduler","i0","Injectable","Inject","InjectionToken","Directive","Input","EventEmitter","Optional","SkipSelf","Output","Self","ContentChildren","ContentChild","NgModule","DOCUMENT","i1","CdkScrollableModule","_getEventTarget","normalizePassiveListenerOptions","_getShadowRoot","coerceBooleanProperty","coerceElement","coerceArray","coerceNumberProperty","isFakeTouchstartFromScreenReader","isFakeMousedownFromScreenReader","Subject","Subscription","animationFrameScheduler","Observable","merge","takeUntil","startWith","map","take","tap","switchMap","i3","extendStyles","dest","source","importantProperties","key","hasOwnProperty","value","setProperty","has","removeProperty","toggleNativeDragInteractions","element","enable","userSelect","style","toggleVisibility","position","top","opacity","left","combineTransforms","transform","initialTransform","parseCssTimeUnitsToMs","multiplier","toLowerCase","indexOf","parseFloat","getTransformTransitionDurationInMs","computedStyle","getComputedStyle","transitionedProperties","parseCssPropertyValue","property","find","prop","propertyIndex","rawDurations","rawDelays","name","getPropertyValue","split","part","trim","getMutableClientRect","clientRect","getBoundingClientRect","right","bottom","width","height","x","y","isInsideClientRect","adjustClientRect","isPointerNearClientRect","rect","threshold","pointerX","pointerY","xThreshold","yThreshold","ParentPositionTracker","constructor","_document","positions","Map","clear","cache","elements","set","scrollPosition","getViewportScrollPosition","forEach","scrollTop","scrollLeft","handleScroll","event","target","cachedPosition","get","newTop","newLeft","viewportScrollPosition","topDifference","leftDifference","node","contains","window","scrollY","scrollX","deepCloneNode","clone","cloneNode","descendantsWithId","querySelectorAll","nodeName","removeAttribute","i","length","transferCanvasData","transferInputData","transferData","selector","callback","descendantElements","cloneElements","cloneUniqueId","type","context","getContext","drawImage","passiveEventListenerOptions","passive","activeEventListenerOptions","MOUSE_EVENT_IGNORE_TIME","dragImportantProperties","Set","DragRef","_config","_ngZone","_viewportRuler","_dragDropRegistry","_passiveTransform","_activeTransform","_hasStartedDragging","_moveEvents","_pointerMoveSubscription","EMPTY","_pointerUpSubscription","_scrollSubscription","_resizeSubscription","_boundaryElement","_nativeInteractionsEnabled","_handles","_disabledHandles","_direction","dragStartDelay","_disabled","beforeStarted","started","released","ended","entered","exited","dropped","moved","_pointerDown","next","targetHandle","_getTargetHandle","disabled","_initializeDragSequence","_rootElement","_pointerMove","pointerPosition","_getPointerPositionOnPage","distanceX","Math","abs","_pickupPositionOnPage","distanceY","isOverThreshold","dragStartThreshold","isDelayElapsed","Date","now","_dragStartTime","_getDragStartDelay","container","_dropContainer","_endDragSequence","isDragging","isReceiving","preventDefault","run","_startDragSequence","constrainedPointerPosition","_getConstrainedPointerPosition","_hasMoved","_lastKnownPointerPosition","_updatePointerDirectionDelta","_updateActiveDropContainer","offset","constrainPosition","_initialClientRect","activeTransform","_applyRootElementTransform","observers","distance","_getDragDistance","delta","_pointerDirectionDelta","_pointerUp","_nativeDragStart","withRootElement","withParent","parentDragRef","_parentPositions","registerDragItem","newValue","_toggleNativeDragInteractions","handle","getPlaceholderElement","_placeholder","getRootElement","getVisibleElement","withHandles","handles","disabledHandles","add","withPreviewTemplate","template","_previewTemplate","withPlaceholderTemplate","_placeholderTemplate","rootElement","_removeRootElementListeners","runOutsideAngular","addEventListener","_initialTransform","undefined","SVGElement","_ownerSVGElement","ownerSVGElement","withBoundaryElement","boundaryElement","unsubscribe","change","subscribe","_containInsideBoundaryOnResize","parent","_parentDragRef","dispose","remove","_anchor","_destroyPreview","_destroyPlaceholder","removeDragItem","_removeSubscriptions","complete","reset","disableHandle","enableHandle","delete","withDirection","direction","_withDropContainer","getFreeDragPosition","setFreeDragPosition","withPreviewContainer","_previewContainer","_sortFromLastPointerPosition","_preview","_previewRef","destroy","_placeholderRef","stopDragging","webkitTapHighlightColor","_rootElementTapHighlight","_stopScrolling","_animatePreviewToPlaceholder","then","_cleanupDragArtifacts","_cleanupCachedDimensions","dropPoint","isTouchEvent","_lastTouchEventTime","dropContainer","parentNode","placeholder","_createPlaceholderElement","anchor","createComment","shadowRoot","insertBefore","_createPreviewElement","body","appendChild","replaceChild","_getPreviewInsertionPoint","start","_initialContainer","_initialIndex","getItemIndex","getScrollableParents","referenceElement","stopPropagation","isTouchSequence","isAuxiliaryMouseButton","button","isSyntheticEvent","isFakeEvent","draggable","rootStyles","pointerMove","pointerUp","scrolled","scrollEvent","_updateOnScroll","_boundaryRect","previewTemplate","_pickupPositionInElement","matchSize","_getPointerPositionInElement","_pointerPositionAtLastDirectionChange","startDragging","_previewRect","currentIndex","isPointerOverContainer","_isOverContainer","item","previousIndex","previousContainer","drop","rawX","rawY","newContainer","_getSiblingContainerFromPosition","exit","enter","sortingDisabled","_startScrollingIfNecessary","_sortItem","_applyPreviewTransform","previewConfig","previewClass","preview","rootRect","viewRef","viewContainer","createEmbeddedView","detectChanges","getRootNode","matchElementSize","getTransform","zIndex","classList","setAttribute","Array","isArray","className","Promise","resolve","placeholderRect","duration","handler","propertyName","removeEventListener","clearTimeout","timeout","setTimeout","placeholderConfig","placeholderTemplate","pointerEvents","elementRect","handleElement","referenceRect","point","targetTouches","_getViewportScrollPosition","pageX","pageY","touches","changedTouches","svgMatrix","getScreenCTM","svgPoint","createSVGPoint","matrixTransform","inverse","dropContainerLock","lockAxis","pickupX","pickupY","boundaryRect","previewWidth","previewHeight","_getPreviewRect","minY","maxY","minX","maxX","clamp$1","pointerPositionOnPage","positionSinceLastChange","changeX","changeY","pointerDirectionChangeThreshold","shouldEnable","styles","currentPosition","pickupPosition","leftOverflow","rightOverflow","topOverflow","bottomOverflow","touch","mouse","scrollDifference","_cachedShadowRoot","initialParent","previewContainer","documentRef","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement","round","min","max","rootNodes","nodeType","ELEMENT_NODE","wrapper","createElement","sourceRect","moveItemInArray","array","fromIndex","toIndex","from","clamp","to","transferArrayItem","currentArray","targetArray","targetIndex","splice","copyArrayItem","SingleAxisSortStrategy","_element","_itemPositions","orientation","_previousSwap","drag","overlaps","items","withItems","sort","pointerDelta","siblings","newIndex","_getItemIndexFromPointerPosition","isHorizontal","findIndex","currentItem","siblingAtNewPosition","newPosition","itemOffset","_getItemOffsetPx","siblingOffset","_getSiblingOffsetPx","oldOrder","slice","sibling","index","isDraggedItem","elementToOffset","activeDraggables","_activeDraggables","newPositionReference","_shouldEnterAsFirstChild","parentElement","push","_cacheItemPositions","withSortPredicate","predicate","_sortPredicate","p","getActiveItemsSnapshot","reverse","updateOnScroll","elementToMeasure","a","b","immediateSibling","end","itemPositions","reversed","lastItemRect","firstItemRect","floor","DROP_PROXIMITY_THRESHOLD","SCROLL_PROXIMITY_THRESHOLD","DropListRef","autoScrollDisabled","autoScrollStep","enterPredicate","sortPredicate","sorted","_isDragging","_draggables","_siblings","_activeSiblings","_viewportScrollSubscription","_verticalScrollDirection","_horizontalScrollDirection","_stopScrollTimers","_startScrollInterval","pipe","_scrollNode","scrollStep","scrollBy","withScrollableParents","registerDropContainer","_sortStrategy","removeDropContainer","_draggingStarted","_notifyReceivingSiblings","_cacheParentPositions","_reset","previousItems","draggedItems","filter","every","connectedTo","withOrientation","_scrollableElements","size","_clientRect","result","scrollNode","verticalScrollDirection","horizontalScrollDirection","getElementScrollDirections","getViewportSize","getVerticalScrollDirection","getHorizontalScrollDirection","_initialScrollSnap","msScrollSnapType","scrollSnapType","_listenToScrollEvents","_stopReceiving","_canReceive","elementFromPoint","nativeElement","_startReceiving","activeSiblings","computedVertical","computedHorizontal","scrollHeight","clientHeight","scrollWidth","clientWidth","activeCapturingEventOptions","capture","DragDropRegistry","_dropInstances","_dragInstances","_activeDragInstances","_globalListeners","_draggingPredicate","scroll","_preventDefaultWhileDragging","_persistentTouchmoveListener","some","startsWith","e","options","config","_clearGlobalListeners","streams","observer","eventOptions","ngOnDestroy","instance","ɵfac","NgZone","ɵprov","args","providedIn","decorators","DEFAULT_CONFIG","DragDrop","createDrag","createDropList","ViewportRuler","CDK_DRAG_PARENT","CDK_DROP_LIST_GROUP","CdkDropListGroup","_items","ɵdir","provide","useExisting","exportAs","providers","CDK_DRAG_CONFIG","assertElementNode","Error","_uniqueIdCounter","CDK_DROP_LIST","CdkDropList","dragDrop","_changeDetectorRef","_scrollDispatcher","_dir","_group","_destroyed","id","_unsortedItems","ngDevMode","_dropListRef","data","_assignDefaults","_setupInputSyncSubscription","_handleEvents","_dropLists","addItem","_syncItemsWithRef","removeItem","getSortedItems","documentPosition","_dragRef","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","ref","correspondingDropList","list","console","warn","_scrollableParentsResolved","scrollableParents","getAncestorScrollContainers","scrollable","getElementRef","markForCheck","emit","dropEvent","draggingDisabled","listAutoScrollDisabled","listOrientation","ElementRef","ChangeDetectorRef","ScrollDispatcher","Directionality","useValue","host","CDK_DRAG_HANDLE","CdkDragHandle","parentDrag","_stateChanges","_parentDrag","CDK_DRAG_PLACEHOLDER","CdkDragPlaceholder","templateRef","TemplateRef","CDK_DRAG_PREVIEW","CdkDragPreview","_matchSize","DRAG_HOST_CLASS","CdkDrag","_viewContainerRef","_selfHandle","subscription","movedEvent","_syncInputs","ngAfterViewInit","onStable","_updateRootElement","_setupHandlesListener","freeDragPosition","ngOnChanges","changes","rootSelectorChange","positionChange","firstChange","rootElementSelector","closest","_getBoundaryElement","boundary","dir","startEvent","releaseEvent","endEvent","enterEvent","exitEvent","childHandleElements","handleInstance","dragRef","ViewContainerRef","descendants","DragDropModule","ɵmod","ɵinj","declarations","exports","SPACE","BACKSPACE","DELETE","TAB","hasModifierKey","ENTER","Attribute","Component","ViewEncapsulation","ChangeDetectionStrategy","mixinTabIndex","mixinColor","mixinDisableRipple","RippleRenderer","MAT_RIPPLE_GLOBAL_OPTIONS","mixinErrorState","MatCommonModule","ErrorStateMatcher","ANIMATION_MODULE_TYPE","FocusKeyManager","i1$1","SelectionModel","i2","Validators","MatFormFieldControl","MatChipSelectionChange","selected","isUserInput","MAT_CHIP_REMOVE","MAT_CHIP_AVATAR","MAT_CHIP_TRAILING_ICON","MatChipBase","_elementRef","_MatChipMixinBase","MatChipAvatar","MatChipTrailingIcon","MatChip","elementRef","platform","globalRippleOptions","animationMode","tabIndex","_hasFocus","chipListSelectable","_chipListMultiple","_chipListDisabled","role","_selected","_selectable","_removable","_onFocus","_onBlur","selectionChange","destroyed","removed","_addHostClassName","_chipRippleTarget","_chipRipple","setupTriggerEvents","rippleConfig","_animationsDisabled","parseInt","rippleDisabled","disableRipple","coercedValue","_dispatchSelectionChange","_value","textContent","selectable","removable","ariaSelected","toString","basicChipAttrName","hasAttribute","tagName","chip","_removeTriggerEvents","select","deselect","selectViaInteraction","toggleSelected","focus","_handleClick","_handleKeydown","keyCode","_blur","Platform","inputs","avatar","trailingIcon","removeIcon","MatChipRemove","_parentChip","parentChip","MAT_CHIPS_DEFAULT_OPTIONS","_MatChipListBase","_defaultErrorStateMatcher","_parentForm","_parentFormGroup","ngControl","stateChanges","nextUniqueId$1","MatChipListChange","MatChipList","controlType","_lastDestroyedChipIndex","_uid","_tabIndex","_userTabIndex","_onTouched","_onChange","_multiple","_compareWith","o1","o2","ariaOrientation","valueChange","valueAccessor","multiple","_selectionModel","_explicitRole","empty","_syncChipsState","compareWith","fn","_initializeSelection","writeValue","_chipInput","required","_required","control","hasValidator","focused","_hasFocusedChip","chips","shouldLabelFloat","chipSelectionChanges","chipFocusChanges","chipBlurChanges","chipRemoveChanges","ngAfterContentInit","_keyManager","withWrap","withVerticalOrientation","withHomeAndEnd","withHorizontalOrientation","tabOut","_allowFocusEscape","_resetChips","_updateTabIndex","_updateFocusForDestroyedChips","ngOnInit","ngDoCheck","updateErrorState","_dropSubscriptions","registerInput","inputElement","setDescribedByIds","ids","join","_setSelectionByValue","registerOnChange","registerOnTouched","setDisabledState","isDisabled","onContainerClick","_originatesFromChip","setFirstItemActive","_focusInput","_keydown","onKeydown","newChipIndex","setActiveItem","_isValidIndex","_clearSelection","currentValue","_selectValue","_sortValues","correspondingChip","skip","_propagateChanges","fallbackValue","valueToEmit","_markAsTouched","_listenToChipsFocus","_listenToChipsSelection","_listenToChipsRemoved","_chipFocusSubscription","_chipBlurSubscription","_chipSelectionSubscription","_chipRemoveSubscription","isSelected","chipIndex","toArray","updateActiveItem","currentElement","NgForm","FormGroupDirective","NgControl","ɵcmp","encapsulation","None","changeDetection","OnPush","userAriaDescribedBy","errorStateMatcher","nextUniqueId","MatChipInput","_defaultOptions","_addOnBlur","separatorKeyCodes","chipEnd","chipList","_chipList","addOnBlur","_focusLastChipOnBackspace","setLastItemActive","_emitChipEnd","_keyup","_focus","_isSeparatorKey","input","chipInput","_onInput","CHIP_DECLARATIONS","MatChipsModule","imports"],"sourceRoot":"webpack:///"}